dropdownlist in Formview with datasource - setting selected value from session variable

J

Jason

I know that in the codebehind I can set the selected value of a
dropdownlist in a formview using findcontrol and
control.selectedvalue=session("whatever")..

But is there a way to set the selected value for a dropdown, that has
datasourceid to a session variable all in the markup? If so how and
where?, Maybe with inline code ? with somethign like
<%response.write(session("x"))%> or maybe set the selected value via
the sql with a param for the session variable? if so, how?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top