J
Jeff Voigt
Is there any way to dynamically get the name of the control that caused the
postback? Since SmartNav is not working for me I'm trying to implement a way
to scroll to the control that caused the post back so the user does not have
to scroll all the time.
I got the script working great and everything else, but I want to be able to
tell the name of the control that posted back. That way we don't have to
hard code much at all.
This is what I have implemented so far:
Private Sub Page_PreRender(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.PreRender
' automatically scroll to the object that posted back (if applicable)
If Page.IsPostBack > 0 Then
RegisterStartupScript("scroll", "<script language=javascript>" +
_scrollToObjectPath + _scrollToObjectName + ".scrollIntoView();</script>")
End If
End Sub
Thanks in advance,
- Jeff
postback? Since SmartNav is not working for me I'm trying to implement a way
to scroll to the control that caused the post back so the user does not have
to scroll all the time.
I got the script working great and everything else, but I want to be able to
tell the name of the control that posted back. That way we don't have to
hard code much at all.
This is what I have implemented so far:
Private Sub Page_PreRender(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.PreRender
' automatically scroll to the object that posted back (if applicable)
If Page.IsPostBack > 0 Then
RegisterStartupScript("scroll", "<script language=javascript>" +
_scrollToObjectPath + _scrollToObjectName + ".scrollIntoView();</script>")
End If
End Sub
Thanks in advance,
- Jeff