|
asp:ControlParameter vs. asp:FormParameter in Master Page |
|
|
I hit what I considered to be an annoying "issue" in ASP.NET 2.0 the other day that I thought I would share so others can avoid the same.
I created a form with some text controls and an sqldatasource that called a stored proc while accepting parameters via asp:FormParameter. This worked great and tested out fine. Once I added the same code into a Master Page, everything began getting passed as "NULL" (it was no longer finding the FormParameters on the page. After troubleshooting for more time than I preferred, I found out that I can achieve success by using the asp:ControlParameter.
Everything is now working fine, and if you have come up to the same thing, I hope this helps you too.
|