I have upload small test web application.
In which i want to know that why not "Redirect on form1" button's click event called?
please check it.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vikas AhlawatPosted Oct 8, 2010, 6:57 AM
You can clealry understand my broblem by following
this article
http://dotnetslackers.com/Events/re-23154_Capture_Master_Page_Events_in_Content_Pages_ASP_NET_2_0.aspx
read 7th line of second paragraph in this article. It give my problem solution but i want other because it is very difficult for new developers.
Suthish NairPosted Oct 8, 2010, 6:35 AM
Vikas AhlawatPosted Oct 8, 2010, 5:43 AM
Can you give example
of passing query string from master page(button click event) to content page
Vikas AhlawatPosted Oct 8, 2010, 3:34 AM
but Form2 Loading on Process" appear when click on "Redirect on form2"
I put break point on every page load event.
Now when i click on the button "Recirect on form1"
then first it goes on Form1 page load event
after that is goes master page load event
then it goes on "Redirect on Form1's" button click event
after that it again goes on Form1 1 page load event
after that it goes again on master page load event
the form 1 appear but script message not appear "From1 Loading on Process"
but when i click on Redirect on form2 then script message appear.
public partial class MasterPage : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Write("");
Response.Redirect("~/Form2.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("");
Response.Redirect("~/Form1.aspx");
}
}
Suthish NairPosted Oct 8, 2010, 3:23 AM
Vikas AhlawatPosted Oct 8, 2010, 3:10 AM
ArshadPosted Oct 8, 2010, 3:10 AM
Its working, both the event is calling.
Regards,
Arshad
Suthish NairPosted Oct 8, 2010, 2:54 AM
Everything is working fine. I think Form1.aspx is your Statup Page?
Ok, test your code by putting breakpoints on every Page_Load of all the forms you have.
You can find how the Master - Content Page relation works.