Hello,
I have some "runat server" form drop downs on the page, for example:
<asp:DropDownList ID="TypeOfParrot" Runat="server" name="TypeOfParrot"
class="textbox">
<asp:ListItem Value="">Please Select</asp:ListItem>
<asp:ListItem Value="Cockatoo">Cockatoo</asp:ListItem>
<asp:ListItem Value="MaCaw">MaCaw</asp:ListItem>
<asp:ListItem Value="African Grey">African Grey</asp:ListItem>
</asp:DropDownList>
So if the Querystring in the URL had domain.com?Parrot=Cockatoo , the
DropDownList above would default to this value both visually and behind the
scenes.
Any help again appreciated!!
Regards,
Gary. 4 1068
What have you tried? It's very similar to your other post, but instead of
..Text, it's another property in a DropDownList. Hint, look for the word
"Selected.." in one of the properties.
Jeff
"Badass Scotsman" <ba*************@aye.net> wrote in message
news:e4*******************@news.demon.co.uk... Hello,
I have some "runat server" form drop downs on the page, for example:
<asp:DropDownList ID="TypeOfParrot" Runat="server" name="TypeOfParrot" class="textbox"> <asp:ListItem Value="">Please Select</asp:ListItem> <asp:ListItem Value="Cockatoo">Cockatoo</asp:ListItem> <asp:ListItem Value="MaCaw">MaCaw</asp:ListItem> <asp:ListItem Value="African Grey">African Grey</asp:ListItem> </asp:DropDownList>
So if the Querystring in the URL had domain.com?Parrot=Cockatoo , the DropDownList above would default to this value both visually and behind the scenes.
Any help again appreciated!!
Regards,
Gary.
The easy way to do this is to have code in the background on your
onload function determine the value of the querystring. Then have it
iterate through the TypeOfParrot.listitems and then tell the
dropdownlist to select whichever Id you previously found.
KT
I was playing with SelectedIndex, but just kept getting annoying errors...
Clueless :)
"Jeff Dillon" <je********@hotmail.com> wrote in message
news:O6**************@TK2MSFTNGP04.phx.gbl... What have you tried? It's very similar to your other post, but instead of .Text, it's another property in a DropDownList. Hint, look for the word "Selected.." in one of the properties.
Jeff
"Badass Scotsman" <ba*************@aye.net> wrote in message news:e4*******************@news.demon.co.uk... Hello,
I have some "runat server" form drop downs on the page, for example:
<asp:DropDownList ID="TypeOfParrot" Runat="server" name="TypeOfParrot" class="textbox"> <asp:ListItem Value="">Please Select</asp:ListItem> <asp:ListItem Value="Cockatoo">Cockatoo</asp:ListItem> <asp:ListItem Value="MaCaw">MaCaw</asp:ListItem> <asp:ListItem Value="African Grey">African Grey</asp:ListItem> </asp:DropDownList>
So if the Querystring in the URL had domain.com?Parrot=Cockatoo , the DropDownList above would default to this value both visually and behind the scenes.
Any help again appreciated!!
Regards,
Gary.
So after an error, your tried something else right? Click once on
SelectedIndex, and press F1.
Did you try the other Selected.. properties? There are only 3 or so...
Let me know how it goes.
Jeff
"Badass Scotsman" <ba*************@aye.net> wrote in message
news:e4*******************@news.demon.co.uk... I was playing with SelectedIndex, but just kept getting annoying errors...
Clueless :)
"Jeff Dillon" <je********@hotmail.com> wrote in message news:O6**************@TK2MSFTNGP04.phx.gbl... What have you tried? It's very similar to your other post, but instead of .Text, it's another property in a DropDownList. Hint, look for the word "Selected.." in one of the properties.
Jeff
"Badass Scotsman" <ba*************@aye.net> wrote in message news:e4*******************@news.demon.co.uk... Hello,
I have some "runat server" form drop downs on the page, for example:
<asp:DropDownList ID="TypeOfParrot" Runat="server" name="TypeOfParrot" class="textbox"> <asp:ListItem Value="">Please Select</asp:ListItem> <asp:ListItem Value="Cockatoo">Cockatoo</asp:ListItem> <asp:ListItem Value="MaCaw">MaCaw</asp:ListItem> <asp:ListItem Value="African Grey">African Grey</asp:ListItem> </asp:DropDownList>
So if the Querystring in the URL had domain.com?Parrot=Cockatoo , the DropDownList above would default to this value both visually and behind the scenes.
Any help again appreciated!!
Regards,
Gary.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: shank |
last post by:
I need a super simple 100% ASP and/or VBScript shopping cart.
No JavaScript allowed!
Can write to cookies, but not a database. (Sessions maybe OK)
I don't need any special buttons and whistles and...
|
by: bayouprophet |
last post by:
Cant get menu script to to put linked page in the same frame. I am
new to Java
and I am wondering what am I doing wrong? below are my java applet
file, frame.html file, and my text file and one...
|
by: gregsands |
last post by:
Hi
I have read all (ok most) of the posts relating to "Call to undefined
function mysql_connect()", read the manual on PHP.net and done
eveything thats ive been asked to do but cant get PHP to...
|
by: Martin Fletcher |
last post by:
I cant get the Concat function to work, please help.
Here's some of my code.
Module modTCP
Public TCP_RECEIVED_DATA As String
Private WithEvents TCP_SERVER As New WinSockSVR
Private Sub...
|
by: Jim Florence |
last post by:
Hi,
I've just add a couple of dropdowns to my ASP form, set up a
sqldatasource and bound to the dropdown and it all works great.
I want the first item of the dropdown to be blank soa fter...
|
by: riteshraha |
last post by:
Hi everyone, I am a member of this forum. i have posted my problem repeatedly to this forum. but i cant get any reply from this forum. plz anyone make any reply of my problem.
I cant retrieve...
|
by: Johan |
last post by:
Hi!
I cant get the ToolStripProgressbar property "Style.Continuous" to work in
my Windows form application. The progress bar still have the default look(blocks)
when i run it.
Is there any...
|
by: leafgreen |
last post by:
Hey everyone. Thanks for helping me with these two super-simple newbie questions. I use DW8.
1. On this page http://adswebsite.net/yahoo-search-versus-google-adwords, on the right column where it...
|
by: =?Utf-8?B?Y29yeQ==?= |
last post by:
i cant get the playstation 3 to connect to call of duty 4 online through the
router but i am able to connect to the game online through the modem. I am
able to still get on the internet through the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |