Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLDataSource parameter
Message
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01335592
Message ID:
01335621
Views:
15
I decided to do this in code behind instead. It worked fine.

>Hi everybody,
>
>I have a UserControl which uses SQLDataSource with SelectParameter being Profile parameter. Now I want to use the same UserControl in other situation where I do not have Profile, but I'm passing my parameter as a QueryString.
>
>I was duplicating the same UserControl in two places with different syntax, but it turned out to be a problem in Deploy.
>
>Here is what I have in ASCX for these two cases:
>
>
> <SelectParameters>
>        <asp:ProfileParameter Name="SiteID" PropertyName="SiteID" Type="Int32" />
>
>and
>
>
> <SelectParameters>
>        <asp:QueryStringParameter DefaultValue="0" Name="SiteID"
>            QueryStringField="sid" Type="Int32" />
>
>Is there some possibility to combine them and do somehow conditionally depending on have I passed QueryString or not? Preferably directly in ASCX?
>
>Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform