Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
hello, the below event hadler invoke th btn2 clickevent, when you click btn_click.

protected void btn_click(object sender, EventArgs e)
{

EventHandler handler = btn2_click; // Where Foo is the event name
if (handler != null)
{
handler (this, e);
}


}

protected void btn2_click(object sender, EventArgs e)
{
Response.Write("hello");
}

likewise, i need to invoke this below event handler. I tried this like above.But It throws an error.

protected void ListView2_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
{

}


i need to invoke that ListView2_PagePropertiesChanging inside the another method of clickevent. like below.

Protected void btn_click(object sender, eventargs e)

{

method1();

}

public void method1()

{

// here i want to invoke that paging event. 

}

help needed.
Posted
Updated 3-Feb-14 6:25am
v2
Comments
JoCodes 4-Feb-14 8:57am    
Added a solution, Have you tried it?

1 solution

Try

ListView2_PagePropertiesChanging(null,null);
//But the method should not be using any of the event parameters.

Note : I havent used this for any scenario .
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900