469,600 Members | 2,554 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,600 developers. It's quick & easy.

How to select data for "current user" in detailsview?

When my users login I want them to be able to change some of their personal
info in a db. I want to use a detailsview control for this.

How can I get the detailsview to only pull up the record based on their
USERID ("current user")?

This SqlDataSource doesn't seem to return anything...

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:MyMainDatabase %>"

SelectCommand="SELECT * FROM [MyUsers] WHERE ([UserId] = @UserId)">

<SelectParameters>

<asp:ProfileParameter Name="UserId" Type="String" />

</SelectParameters>

</asp:SqlDataSource>
Thanks.
Jan 15 '06 #1
1 2188
Is it giving any errors?
Patrick
"VB Programmer" <do**@emailme.com> wrote in message
news:ug**************@TK2MSFTNGP11.phx.gbl...
When my users login I want them to be able to change some of their personal info in a db. I want to use a detailsview control for this.

How can I get the detailsview to only pull up the record based on their
USERID ("current user")?

This SqlDataSource doesn't seem to return anything...

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyMainDatabase %>"

SelectCommand="SELECT * FROM [MyUsers] WHERE ([UserId] = @UserId)">

<SelectParameters>

<asp:ProfileParameter Name="UserId" Type="String" />

</SelectParameters>

</asp:SqlDataSource>
Thanks.

Jan 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by fl | last post: by
3 posts views Thread by RR | last post: by
5 posts views Thread by mabond | last post: by
5 posts views Thread by WP | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.