473,396 Members | 2,017 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,396 software developers and data experts.

How to append DropDownList value to button's PostBackUrl?

rob
Hi,

I have a button whose PostBackUrl should include a value from a dropdownlist
on the same page. Should I do that in the button's on click event? What
I'd like to end up with is a post back url that looks like the following:
PostBackUrl=somepage.aspx?param=<valuewhere <valuecomes from the
currently selected item in the list.

Thanks,
Rob
Mar 20 '08 #1
2 2657
Hi,

this does not reply 100% exactly what you asked for but in my post

ASP.NET: trigger cross-page postback on ListBox selection change
http://aspadvice.com/blogs/joteke/ar...on-change.aspx

I demonstrate how to use PostBackUrl type of stuff (=cross-page postback)
so that the value is accessible via PreviousPage

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"rob" <r@c.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hi,

I have a button whose PostBackUrl should include a value from a
dropdownlist on the same page. Should I do that in the button's on click
event? What I'd like to end up with is a post back url that looks like
the following:
PostBackUrl=somepage.aspx?param=<valuewhere <valuecomes from the
currently selected item in the list.

Thanks,
Rob

Mar 20 '08 #2
Forgot to say, it should also work for DropDownList just as well as for
ListBox.
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:Or**************@TK2MSFTNGP03.phx.gbl...
Hi,

this does not reply 100% exactly what you asked for but in my post

ASP.NET: trigger cross-page postback on ListBox selection change
http://aspadvice.com/blogs/joteke/ar...on-change.aspx

I demonstrate how to use PostBackUrl type of stuff (=cross-page postback)
so that the value is accessible via PreviousPage

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"rob" <r@c.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>Hi,

I have a button whose PostBackUrl should include a value from a
dropdownlist on the same page. Should I do that in the button's on click
event? What I'd like to end up with is a post back url that looks like
the following:
PostBackUrl=somepage.aspx?param=<valuewhere <valuecomes from the
currently selected item in the list.

Thanks,
Rob


Mar 20 '08 #3

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

Similar topics

4
by: theo | last post by:
Program flow...load file,then extract the xml text tags from the file,then the number of Xml tags retrieved from the file determines the number of dropdownlist controls instanciated in the...
2
by: Benedict Teoh | last post by:
I created a dropdownlist containing day, month and year field and expose a property to assign a date. When I call from a aspx page and assign the value, the new date is not displayed until a submit...
3
by: glbdev | last post by:
Hi. I have a gridview in which each row has an image button attached. I have each button in each row set up to be associated with a DB field. When I hover above the button it shows me the...
4
by: Nathan Sokalski | last post by:
I have a Button that uses the PostBackUrl property which is inside a Repeater template. When I get to the Page that is being posted to (the one specified in PostBackUrl), I am having trouble...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.