I think you are on the right track when thinking about the page lifecycle.
I think your best bet would be one of the events of the SQLDataSource
control or the gridview control istelf.
Perhaps the gridviews databinding event.
Also maybe you could access the Requesti.Servervariables("LOGIN_USER")
directly instead of pasing it to another control. If you follow what I am
suggesting
:
I have one parameter which I get in the Page_Load event from
Request.Servervariables("LOGON_USER"), and have verified that it is set to a
loginid.
I store this loginid in a Property that stores the value in the ViewState.
I use a TextBox control that has a style=display:none, and a Text value set
to the Property.
Finally, I have a SqlDataSource SELECT control parameter set to the TextBox
control.
Should I use the Page_PreRender event instead?
--
Thank you kindly,
Dan Sikorsky BA, BSCE, MCS
:
chances are you havent set up a default value for your parameter and/or set
it to a control/querystring etc etc.
so when the grid loads it wants a value for its parameter question becomes
where does it get it from?
:
When I hit the Test Query button in the SqlDataSource design, all the rows
come back. But when I run the website, without any changes, in the IDE, the
GridView tied to the SqlDataSoure is empty.
How do I get this working?