I'm new to this so sry for askingbut i can't find a solution on this, and i dont know how to do it.
I have an IF statsment on code_behind for an asp.net page, like this.:
if my session isNot nothing, and if its N then it run the function LoadDetails() If nothing then it also load the function, and if Y then do nothing.Code:If Session("UserActiv") IsNot Nothing Then If Session("UserActiv").ToString() = "N" Then ClientScript.RegisterStartupScript(Me.GetType(), "Details", "LoadDetails();", True) End If Else ClientScript.RegisterStartupScript(Me.GetType(), "Details", "LoadDetails();", True) End If
then i have the function on my main page, my only problem is, that it load the function every time i load the page, also if the session is Y, i have checked for upper Y/N and lower y/n issues and all is in UPPER case. so no problem there.
my loadDetails() function is like this:
Can someone help me getting this to work, so it load at page_load like now, BUT only if the session is nothing or if its N..Code:<script language="javascript" type="text/javascript"> function LoadDetails() { myModal.load(); } $(document).ready(function () { $("#myModal").modal({ "backdrop": "static", // if true, then the backdrop can be closed with a click, if false then there is no backdrop. "keyboard": false }) }); </script>
I know its my script thats wrong, but i dont know how to fix it.




but i can't find a solution on this, and i dont know how to do it.
Reply With Quote