Monday, January 18, 2010

VB.NET Returning to position of link in user control?

I have a page that loads a user control for each record in a dataset. Each usercontrol has an 'Open/Close' link button which you can use to change the status. It updates the record in the database and does a redirect back to ther page using a Response.Redirect.





The problem I'm having is if you scroll down to lets say the 5th item and click the link button it refreshes the page and leaves you at the top. How can I get the screen to return to the user control that has the button you just clicked.





I think I need to use anchors somehow... but I've never worked with those before and am not sure how to use them. Someone please help! :)





Thanks,


- M -VB.NET Returning to position of link in user control?
What you really need to use is AJAX, so you don't have to refresh the whole page just to change one little thing on it. There are many AJAX tutorials on the web. (AJAX is a combination of your server-side code [I'm guessing ASP or ASPX in this case] and Javascript.)VB.NET Returning to position of link in user control?
They are called HTML anchor bookmarks and you can learn how to use them here: http://programming.top54u.com/post/HTML-鈥?/a>

No comments:

Post a Comment