|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Very simple asp.net question
Originally posted by : BeginnerI am a beginner, I installed asp.net v1 and it seems to work right.I bought a wrox book: beginning asp.net with c# and this is the code from them but it seems to be not working for me....here it is void Page_Load() { if (Request.Form["list1"] != "") { message.Text = "You have selected " + Request.Form["list1"]; } } Drop Down List Example Which city do you wish to look at hotels for? Madrid Oslo Lisbon THE problem:the label "You have selected " keeps getting displayed on the 1st time the page is loaded when nothing from the list has been chosen.Can someone tell me why?I have tried the VB.net version of it, it works correctly.
|
|
#2
|
|||
|
|||
|
Originally posted by : BeginnerSomeone help please.
|
|
#3
|
|||
|
|||
|
Originally posted by : Andres Melguizo Velez (lucan@bigfoot.com)Hi!Use null to check list1 instead an empty string.if (Request.Form["list1"] != null)I hope it could be useful.Bye.------------Beginner at 1/24/2002 1:10:20 PMSomeone help please.
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > Very simple asp.net question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|