asp.net - I want an HTML anchor call a page method and JUST that method;No page_load. Is that posiible?if it is then HOW? -


<a href="a.aspx?qs=2"></a> 

clicking should fire method getmedata(obj sender, eventargs e) in codebehind of a.aspx getmedata() bound aspbutton ineed reuse method on click event within html link.

public void page_init(object o, eventargs e)     {         if (!string.isnullorempty(request.querystring["curpage"]))         {             filterordersbydate();         }     }   public  void filterordersbydate(object sender, eventargs e)     { //with bll logic calls:   list<esalesorder> list = bsales.getsalesorderadminbydate(esalesdate,curpage,perpage); } 

but call on filterordersbydate(); never reaches nevertheless satisfies above condition...instead goes through page load , execute whatever finds in page_load , done..there all.

well... passing query string isn't issue @ all.

question: binding data?

if don't want invoke method on page_load should invoke on_item_data_bound on web control suppose.

method this:

protected void on_itemdatabound(object sender, eventargs e)   {     //request query string , something. } 

then call method on web control.

cheers.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -