You can pass parameters using the new declarative data source model. The
ASP.NET quickstarts touches on this, so it's not as in depth of a sample
that I'd like to give:
http://beta.asp.net/QUICKSTART/aspne...spx#parameters
So since those aren't so great, here's a snippet. You'd need to add the parameter
to the DataSource:
<UpdateParameters>
<asp

arameter Name="UpdateBy" Type="String" />
</UpdateParameters>
And since there's no <asp:CurrentUser> parameter, you'll have to manually
set this one in Page_Load:
protected void Page_Load(object sender, EventArgs e)
{
SqlDataSource1.UpdateParameters["UpdatedBy"].DefaultValue = User.Identity.Name;
}
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hi
>
> Can anybody point me to good articles or sites on using stored proc's
> in a
> grid or details view in ASP2.0
> Also how can I return the username of the current logged in user as a
> parameter value in a stored proc?
> i.e. @UpdatedBy.value = LoginName
> I am using the wizard in asp.net 2.0
> Many thanks
>