Call JQUERY function from Client Side (VB sub)
How can i call a jquery method from vb su开发者_JS百科b routine?
My code is when it returns false, the div which contains an alert message will show.
Her'es my code, but its not working:
If res = Nothing Then
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "PopupMessage", "$('.styleError').toggle('5000');", True)
End IF
Is this in an UpdatePanel? If so, see ASP.NET - UpdatePanel and JavaScript .
Also, check the Javascript console in the browser to see if any errors are generated, for example you might find that you need to wrap your code in a way similar to $(document).ready(function() {/* your code here */} )
精彩评论