ASP.NET Master Page Server Control Events -
Every time I had a lot of problems to try to keep a server control button and event handler on a master page If I clicked one of the content pages, the postback will not take me back to the content page, but on the site. Master url, therefore my application will crash automatically. I used the Internet for a solution, Take Under no I did not have to work for me. After all I decided one thing very easy and so I thought I would share it because someone else is in such kind of troubles.
On the Page_Init () method of the master page, I paste the URL of the server control postback url to the current page Yuri, . Current. request. Url Assigned using the ASSOUUUURI; (UserLogin is the name of my button control)
Protected Zero Page_Init (Object Sender, EventArgs e) {UserLogin.PostBackUrl = HttpContext.Current.Request.Url.AbsoluteUri; }
Comments
Post a Comment