PostBackUrl Dynamic?

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top