>>>Paul, unfortunately your suggestion doesn't work. When I entered cUserId = Me.Page.RoundPanel1.FindControl("HIddenField1").UniqueId, I got the squiggly blue line under it and when I hovered the mouse over it, it said that RoundPanel1 is not a member of class Page. This is so frustrating! Everything I try fails. It shouldn't be this difficult, should it?
>>>
>>>Dana
>>>
>>
>>Dana,
>>
>>Have you tried my suggestion of using Selecting event of SQLDataSource to set the parameter? I used this technique several times, it works.
>
>Hi Naomi,
>
>I am very new to the whole .NET world. I find the online help of VS2005 rather lacking in many cases. It kind of expects you to already know a lot of the stuff. That's fine for a refresher, but if it's new to you...what the hell? Sometimes it has helped, though.
>
>How would that be any better at finding the control than the other methods? The whole SQLDataSource and ControlParameters is touted as being the easiest, most efficient way to do this. I'm not seeing that right now. I guess I should go back to my old way of not believing everything I read. :)
>
>Dana
See last message of this thread
http://forums.asp.net/t/1438956.aspx for a sample of using parameter's value in Inserted event of SQLDataSource.
In your case define your parameter to be just a parameter (not a control parameter) and try to use full reference to the control (not really a good idea, may be).
You can create a method to recursively use FindControl - google on "recursive FindControl .NET " and I think you should find the code.
If it's not broken, fix it until it is.
My Blog