PostBackUrl Dynamic?

  • Thread starter Thread starter xeroxero
  • Start date Start date
X

xeroxero

I have the property "PostBackUrl" set on a LinkButton set to
"~/page.aspx". I tried to change this value in the Page_Load as well
as the Render event to a different page based on some flow/business
logic. Nothing worked.

What is the best way to dynamically define PostBackUrl for a control
in a C# code-behind, and what is the best way to know in the receiving
page which control fired the PostBack event?


Thanks.
 
Hi,
I am making a wild guess but you can give it a try:

LinkButton1.Attributes.Add("PostBackUrl","SecondPageName.aspx")

Also please let me know whether this worked or not.

Thanks and Regards,
Manish Bafna
 
Back
Top