sandya_116
asked on
Change client-side javascript variable value from server side
On page load, I have the below code to set the totalcount variable value to 25. On a button click, I would like to change this value to row count of a grid. How do I change this?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim sb As StringBuilder = New StringBuilder()
sb.Append("<script type=""text/javascript"">" )
sb.AppendFormat("var Label1 = '{0}';", "Less")
sb.AppendFormat("var Label2 = '{0}';", "More")
b.AppendFormat("var {0} = '{1}';", "TotalCount", 25)
sb.Append("initPages();")
sb.Append("</script>")
Me.Page.ClientScript.Regis terClientS criptBlock (Me.GetTyp e(), "searchscript", sb.ToString())
End Sub
Protected Sub Continue_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Continue.Click
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim sb As StringBuilder = New StringBuilder()
sb.Append("<script type=""text/javascript"">"
sb.AppendFormat("var Label1 = '{0}';", "Less")
sb.AppendFormat("var Label2 = '{0}';", "More")
b.AppendFormat("var {0} = '{1}';", "TotalCount", 25)
sb.Append("initPages();")
sb.Append("</script>")
Me.Page.ClientScript.Regis
End Sub
Protected Sub Continue_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Continue.Click
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER