By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,206 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

GridView "Back To Top"

P: n/a
I have a GridView that is being populated with the MembershipUser
content. There are about 350 records being returned. I'm trying to
have the GridView return to the top of the page when a user selects a
given record. The only thing that comes to mind is to put the below
under the "_SelectedIndexChanged" event...but that doesn't work.

StringBuilder sb = new StringBuilder();

sb.Append("<script>");
sb.Append("window.scrollTo(0,0);");
sb.Append("</script>");

Page.RegisterStartupScript("test", sb.ToString());

If someone could point out what I'm doing wrong, or if there's a
different way, I'm open.

Thanks
Sep 9 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.