Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 23rd, 2005, 06:25 AM
Registered User
 
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default dynamic drop down.

Hi,
What is wrong with following code:
I want to clear list item of another dropdown, when selection is done in first dropdown.
---------
<%@ Page Debug="True" %>
<script language="vb" runat="server">

Sub ChangeActivity(sender As Object, e As System.EventArgs)
    act.Items.RemoveAt(0)
    'act.Items.Add(New ListItem("text","value"))
    lbl.text = "ss"
End sub
</script>

<html>
<body>
<form runat="server">
<asp:label id="lbl" runat="server"/>
<asp:DropDownList id="wtype" runat="server"
  AutoPostBack="false"
  OnSelectedIndexChanged="ChangeActivity"
  >
    <asp:ListItem
      Text="label"
      Value="value"
     />

    <asp:ListItem
      Text="label"
      Value="value"
       />
</asp:DropDownList>

<asp:DropDownList id="act" runat="server" >
    <asp:ListItem
      Text="act"
      Value="value"
     />
</asp:DropDownList>
</form>
</body>
</html>

---------

Rupen Anjaria.:)
------------------
We CAN'T avoid problems, but can solve it.
 
Old September 23rd, 2005, 03:08 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

what is the problem..is there an error? please be more specific

 
Old September 26th, 2005, 05:07 AM
Registered User
 
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default

there is no error, atually no value comes in second drop down.

Rupen Anjaria.:)
------------------
We CAN'T avoid problems, but can solve it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with dynamic drop down lists MarkGT Classic ASP Basics 3 April 29th, 2008 06:05 PM
Dynamic drop down list bart.moons Classic ASP Databases 9 January 25th, 2005 10:05 AM
Dynamic drop-down list lucian Dreamweaver (all versions) 2 July 8th, 2004 05:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.