Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
Help me on this with SQLPARAMETERS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Patrick Olurotimi Ige, post: 476931"] Grant thanks for the idea.. But i don't want it this way:- <asp:DropDownList id="dd" runat="server"> <asp:ListItem value="104">Bank</asp:ListItem> <asp:ListItem value="104">Phone</asp:ListItem> </asp:DropDownList> I want it dynamic so i have Databinded a DropDownlist. But something seems funny here if i use tha above it works and if i don't databind it works But if i databind it and then set :- Cmd.Parameters.Add(New SqlParameter("@ProductID", SqlDbType.Int, 1)).Value = dd.SelectedValue; it seems not to read the DropDwon selected value!!! But i notice i can get the Selected value on page_load And again if i view the source i can see the values are set well.. I have also set visible to FALSE since i don't want to make the DropDownList visiblae but just to use it to set the value.. in page_load i have If Not Page.IsPostBack Then DropDown_Features()'dropdownlist GetValue()'dropdownlist where i get the dd.SelectedItem.Value 'Response.Write("" & dd.SelectedItem.Value & "") End If But in my sub DropDown_Features()if i try and set Cmd.Parameters.Add(New SqlParameter("@ProductID", SqlDbType.Int, 1)).Value = dd.SelectedValue; I get an error "Input string was not in a correct format. " Any ideas? [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
Help me on this with SQLPARAMETERS
Top