hi
i have a problem with settings i.e i created a button in asp.net using visula studio 2010 but i am unable to redirect to the button click event. whenever i double clicked on that button in the design it is redirecting to .aspx but it should redirect to .aspx.cs. Manually i am able to open that .aspx.cs but if i write code for click event it is not accepting.
how to over come this.
thank u in advance.
Loading
Suthish NairPosted Mar 1, 2011, 11:35 AM
srikanth sriPosted Mar 1, 2011, 8:13 AM
Anyway I am explaining my problem again;
whenever i double click on button to go to event page it is redirecting to source page(script code) but i have to go to click event page directly like below
protected void button1_click(................)
{
}
but it is redirecting to source page like below
Suthish NairPosted Feb 28, 2011, 9:26 AM
While adding a new Web Page did you uncheck "Place code in separte file" option?
If you need a code behind this option must be selected.
If that not the case delete the button, add a new one.
Go to Button Properties Event window, double click on "Click" event.
or, just paste the code in code behind like this..
protected void Button1_Click(object sender, EventArgs e)