Cerebrus
unread,Nov 11, 2008, 12:38:50 AM11/11/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
1. It appears that your parameter value is equivalent to something
passed in the QueryString or through the Form collection. In these
cases, it would be more appropriate for you to simply use a
QueryStringParameter or FormParameter. This would obviate the need for
setting your Parameter on Page load.
2. Since you are interested only in the SelectCommand, the
SqlDataSource_Selecting event is the place to set the value of the
Parameter. Page_Load would not be the correct place, IMHO.
3. You should not be adding a new Parameter, but should instead access
the declared Parameter and set it's value, or else it invalidates the
purpose of using the Declarative model.