473,287 Members | 1,663 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,287 software developers and data experts.

Second Super Simple Question (Which I cant get!)

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.

May 18 '06 #1
4 1066
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.

May 18 '06 #2
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

May 18 '06 #3
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.


May 18 '06 #4
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.



May 19 '06 #5

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

Similar topics

1
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...
1
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...
4
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...
4
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...
8
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...
0
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...
1
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...
0
leafgreen
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...
3
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...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: 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)...

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.