Sorry, the second question contained a little error: here the new version:
1) With this code, i never see the alert message. Why? How to see it?
Page.ClientScript.RegisterClientScriptBlock(Me.Get Type(), "myscript", _
" alert('you go to stating page.');", True)
response.redirect("start.aspx", false)
2) with this code, when clicking on button1, instead of going to file
anywhere.aspx, nothing happens. Why and how to
solve that?
Page.ClientScript.RegisterClientScriptBlock(Me.Get Type(), "myscript", _
" alert('you go to stating page.');" & _
" window.location.href='start.aspx';", True)
This is into file start.aspx:
<asp:Button ID="Button1" runat="server" Text="click"
PostBackUrl="~/ANYWHERE.aspx" />
Thanks
Tony
"Tony" <tr*@sfgv.sgschreef in bericht
news:%2*****************@TK2MSFTNGP06.phx.gbl...
Hi,
I have two questions:
1) With this code, i never see the alert message. Why? How to see it?
Page.ClientScript.RegisterClientScriptBlock(Me.Get Type(), "myscript", _
" alert('you go to stating page.');", True)
response.redirect("start.aspx", false)
2) with this code, when clicking on button1, nothing happens. Why and how
to solve that?
Page.ClientScript.RegisterClientScriptBlock(Me.Get Type(), "myscript", _
" alert('you go to stating page.');" & _
" window.location.href='start.aspx';", True)
<asp:Button ID="Button1" runat="server" Text="click"
PostBackUrl="~/start.aspx" />
Thanks
Tony