开发者

Link is not working as expectation

开发者 https://www.devze.com 2022-12-22 23:34 出处:网络
I have a user control of menu which have links on which user is redirected to the desired page. When I am using that user control in my aspx page, on first time when user click to the link he is redir

I have a user control of menu which have links on which user is redirected to the desired page. When I am using that user control in my aspx page, on first time when user click to the link he is redirected to the destination, but when user again click that link it is showing the page stating that "cannot find server", the same thing is happened to the other links also. In my user control I am using:

Private void Link1_Click(Object sender, eventargs e)
{
 Response.Redirect("Secondpage.aspx");
}

Private void Link2_Click(Object sender, eventargs e)
{
 Response.Redirect("Thirdpage.aspx");
}

Unexpectdly, the same code is working fine on the production server but throwing issue in the developmwnt server.

I am not sure the cause of th开发者_如何学JAVAe error.. Thanks in advance.


your event is not found on the server as it is defined as Private

I think Private should be Protected

Protected void Link2_Click(Object sender, eventargs e)
{
 Response.Redirect("Thirdpage.aspx");
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号