Master page + SqlDataSource = ?

  • Thread starter Thread starter ASF
  • Start date Start date
A

ASF

I have a 2.0 framework page that has several texboxes, a gridview, and
a sqldatasource. The user enters criteria in the textboxes, clicks a
button, and the gridview displays the appropriate data. VERY simple.

Recently I started a new web site in VS 2005 and created a Master Page.
I took the search page above and converted it into a content page.
Suddenly it doesn't work properly. The gridview still displays data
according to user criteria BUT no longer accepts the date parameters (2
of the textboxes are "Min Date" and "Max Date"). It doesn't error out,
it just always uses the default value. Again, not for all the search
criteria JUST for the date textboxes.

The first thing I did was to take another completely different search
page and stuck it in as a content page. Same result. So I completely
wiped that web site completely and started from scratch. Same result.

I have option strict on.
The sqldatasource in Design view utilizes entered date criteria just
fine (it works!).
And once again, all the pages I've tried work wonderfully as long as
they're built as standalone aspx pages (e.g., non-content pages).

The master/content relationship is pretty straightforward, so what am I
missing here? Could someone point me in the right direction? Any ideas?
 
Figured it out. Just for those poor folks in the future who stumble
across this...
For whatever reason, asp:formparameter's (in a sqldatasource) do not
apparently work within a content page. They must be changed to
asp:controlparameter's to function properly. I cannot explain this.
 
Back
Top