Response.Redirect question

N

niv

private void Button1_Click(object sender,
System.EventArgs e)
{
Response.Redirect("regpopup.aspx");

}

Anyone know why this does not navigate to regpopup.aspx?
 
A

Alvin Bruney [MVP]

is regpopup part of the application?
is the code getting executed?
is the page load function of regpopup.aspx getting called?
 
R

ranganh

Hi,

If you are using visual studio.net and having the function in code behind,
go to design view and double-click on the Button1 such that the event handler
delegate is initiated.

Secondly, if you are using inline code (webmatrix or simply putting the code
in the aspx page itself), you need to specify the onclick attribute for the
button in the declaration as <asp:button id="button1"
onclick="Button1_Click"> etc.,

Finally, put a response.write before the response.redirect and check if the
response is sent to the client.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,361
Latest member
eitamoro

Latest Threads

Top