To solve my problem I used a link button
There you go!
If I cannot open a window using vb.net code and I cannot ask
questions/present messages using vb.net code....
??? I think you have a fundamental misunderstanding of the ASP.NET paradigm.
Server-side code (VB.NET, C#, J# or whatever) has two principal functions:
1) to render client-side markup (HTML) and code (JavaScript) dynamically at
runtime (that's the "Active" bit in "Active Server Pages") and stream it
down to the browser;
2) to interact with the rest of the network's resources e.g. SQL Server (or
whatever RDBMS), Exchange Server, ActiveDirectory etc etc
Once the server-side processing has been completed and the page streamed
down to the browser, ASP.NET knows nothing further about what happens on
that browser until it receives another HttpRequest from it.
Opening a (new) window or asking the user a question are both client-side
functions so, by definition, they're not handled by VB.NET because that runs
server-side. However, as previously mentioned, there's nothing to stop
VB.NET creating the client-side mechanism for opening a new window or asking
a question. A very common use of this is asking the user to confirm whether
they want to perform an action, e.g. to delete a record.
Let's say you have an <asp:Button> web control as follows:
<asp:Button ID="MyDeleteButton" runat="server" Text="Delete"
OnClick="MyDeleteButton_Click" ToolTip="Delete the current record" />
Clicking this button would cause the page to post back to the server and
(eventually) run the MyDeleteButton_Click method in your server-side code.
However, if you want to ask the user to confirm whether they really want to
delete the record, you would do the following in your page's Page_Load
method:
MyDeleteButton.Attributes.Add("onclick", "return confirm('Are you sure you
want to delete this record?')
Now, then the user clicks the Delete button, they will be presented with the
standard JavaScript confirm dialog. If they click "Cancel", nothing will
happen - the page will not post back and the server-side code will not run.
If they click OK, then the page will post back, and the server-side code
will run.
Why should I use .NET technology then ?
You don't have to use .NET technology if you don't want to...