Click event not being called for HTML submit button
I need to add button in user control. When the button is clicked url should be captured and stored in a session. When I click the button, server click event is not being called. I am in confusion why it is not being called. Did I made anything wrong here? Please suggest.
I have the following code:
ascx:
<input type="submit" id="QuickViewbutton" value="Click to add this page to Quick View"
runat="server" onserverclick="addQuickView" clientidmode="Static"/>
ascx.cs:
In page load:
QuickViewbutton.ServerClick += new System.EventHandler(this.addQuickView);
In protected void addQuickView(Object sender, EventArgs e) function I have written the code for fetching url:
string strUrl = HttpContext.Current.Request.Url.AbsoluteUri;
Session["QuickViewUrl"] = strUrl;
链接地址: http://www.djcxy.com/p/35704.html
上一篇: Windows窗体AximageEdit控件事件初始化
下一篇: 点击事件没有被HTML提交按钮调用