Obtaining value from a drop down list problem

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Obtaining value from a drop down list problem

Post by jmestep » Wed Nov 05, 2008 2:53 pm

I'm not sure exactly where to search for this.
I am creating a file upload control using most of Able's code. I would like to pick up the value from a drop down list box on the form and pre-pend that to the name of the file. I don't know if I have the code in the wrong place or am using the wrong code to try to get the value.
Within the UploadButton_Click event, I have:
string selectedItem = DropDownListTemplateFields.SelectedValue;

then later on is the code to add it to the file name.
If I do something like this, it works:

string selectedItem = "Add this";

What am I doing wrong?

Thanks
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Obtaining value from a drop down list problem

Post by jmestep » Wed Nov 05, 2008 6:25 pm

Duh, I found it. EnableViewState="true" fixed it. I have it false in most places because of the lectures on how big view state gets then I forget about it until something like this happens.

Post Reply