473,320 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

PostBackUrl Dynamic?


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.

Dec 10 '06 #1
2 7511
Hi,
I am making a wild guess but you can give it a try:

LinkButton1.Attributes.Add("PostBackUrl","SecondPa geName.aspx")

Also please let me know whether this worked or not.

Thanks and Regards,
Manish Bafna

"xeroxero" wrote:
>
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.

Dec 10 '06 #2
Thanks for the help. That worked out.

Jan 25 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: osh | last post by:
All, I am having trouble using the PostBackUrl feature in .NET 2.0. I have several User Controls that are on a MasterPage. The User Controls contain the form fields for a basic search on...
0
by: wendylau81 | last post by:
We are currently using ASP.NET 2.0 to revamp one of our web applications. Let me try to briefly explain how each page is laid out... Usually within the page, there are 3 components... The...
1
by: Wendy | last post by:
I had previously posted this in inetserver.asp.components, I don't think that was the right place... anyways, here is a repost: We are currently using ASP.NET 2.0 to revamp one of our web...
0
by: Wendy | last post by:
We are currently using ASP.NET 2.0 to revamp one of our web applications. Let me try to briefly explain how each page is laid out... Usually within the page, there are 3 components... The header,...
4
by: sck10 | last post by:
Hello, Can you use the PostBackUrl to post to different sites? I have a page (PostBackURL.aspx' ) on one website (same server) that has a button set to: PostBackURL="http://zone1.web.com" ...
1
by: Chris | last post by:
Hi, i created an ImageButton within an ItemTemplate of a datalist (in shop.aspx). There are two possibilities: 1) when the user is logged and he clicks on an image, he must be 'postbacked' to...
5
by: Matt | last post by:
Creating Dynamic aspnet link buttons with in user control, Then i use the control on ever page with wraped with master page. I get the url of the link buttons from xml. Parameter from xml also...
2
by: noneya22 | last post by:
I'm using asp.net 2.0. I have a page that has a save button and a cancel button along with a text field. All controls are asp.net server controls. I have JavaScript that prompts the user if he...
1
by: joseph | last post by:
Hello Could you help i want to use postbackurl to a new window, not replace previous page. i doing something onclientscript="form1.target='_blank'" postbackurl="~/default2.aspx" is not work.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.