473,471 Members | 1,684 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DropDownList pass paramater

1 New Member
I want to create a dropdownlist when an item is selected the user is redirected to another page and content about the item is displayed, all of this is done with stored procedures, but it does not seem to pass parameters to the stored procedure.
Can anyone help please?

This does not seem to work:
Expand|Select|Wrap|Line Numbers
  1. <HeaderTemplate>
  2.         Select Width:
  3. </HeaderTemplate>
  4. <ItemTemplate>
  5.             <asp:DropDownList ID="DropDownList1" 
  6.                 runat="server" AutoPostBack="True" 
  7.                 DataSourceID="SqlDataSource1"
  8.                 DataTextField="Width" 
  9.                 DataValueField="WidthID" 
  10.                 SelectedValue='<%# Eval("WidthID") %>'
  11.                 NavigateUrl='<%# Link.ToWidth(Eval("WidthID").ToString())%>'
  12.                 Width="100px" AppendDataBoundItems="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
  13.              </asp:DropDownList>
  14.     <asp:HyperLink ID="HyperLink1" runat="server"
  15.         text="Click">
  16.     </asp:HyperLink>
  17. </ItemTemplate>
  18. </asp:FormView>  
  19.  
Feb 16 '10 #1
0 801

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Earl Teigrob | last post by:
I want to write a function where I pass in a reference to a dropdownlist and a "match value" and have it returns the index of the dropdownlist item that matchs (or -1 if there is no match) ...
0
by: adam | last post by:
i have custom user control and i'm trying to pass values to custom user control......I need help it seems to me i cannot pass the value to user control from dropdownlist. I have property in a...
2
by: ruca | last post by:
I have this in code: I'm reading data from a .TXT file ---------------------------------------------------- Sub ProcessUser(txtLine) On Error Resume Next Dim p1, pos as Integer Dim Cd,...
2
by: jm | last post by:
I have datagrid. On this datagrid there is a button and a dropdownlist. When I press the button, I want the selectedIndex of the dropdownlist. There is a button and a dropdownlist for each...
8
by: darrel | last post by:
I'm still trying to fully understand how best to pass variables between pages/usercontrols/each other. On a current site I've done, I've had one userControl do the logic and set the variable,...
6
by: Julius Fenata | last post by:
Dear all, I have created client-side scripting to trigger event onChange from code-behind, like this: DropDownList1.Attributes = "GenerateArticleID()"; At the script on Windows Form, I...
1
by: Liz | last post by:
I have a page with several dropdownlists, several text boxes and several buttons which perform calculations. I need to validate one dropdownlist (not the whole page) with the click of one button. I...
1
by: mr2_93 | last post by:
Hi All, I am new to ASP.NET and I am looking for help with the dropdownlist data control. I wonder if someone could show me how to past the SelectedValue of a data-bind dropdownlist to...
11
by: venkatagmail | last post by:
I have problem understanding pass by value and pass by reference and want to how how they are or appear in the memory: I had to get my basics right again. I create an array and try all possible...
2
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i'm in vs2005 designer view editing a formview's edit template. i have a dropdownlist and i'm trying to bind the SelectedValue to a custom expression. i was wondering if it is possible to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
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...
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...
0
agi2029
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.