Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate


JQuery Not Work
Wednesday, June 26th, 2013 at 6:12:58pm UTC 

  1. ASPX code
  2. <asp:Content runat="server" ID="Content1" ContentPlaceHolderID="HeadContent">
  3.     <link rel="stylesheet" href="" />
  4.     <script src=""></script>
  5.     <script src=""></script>
  6.     <link rel="stylesheet" href="/resources/demos/style.css" />
  7.   <script type="text/javascript">
  8.         $(function showMyDialog() {
  9.             $("#dialog-modal").dialog({
  10.                 autoOpen: true,
  11.                 modal: true
  12.             });
  13.         });
  14.     </script>
  15. </asp:Content>
  17. <div id="dialog-modal">     
  18.         <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
  19. </div>
  21. C# code
  22. protected void Page_Load(object sender, EventArgs e)
  23. {
  24.    Label1.Text = "Some Text";
  25.    //conditionLoadJQuery is an example of condition that only is true some times. But the JQuery is executing when the conditionLoadJQuery is false and the program scope not enter in the IF....
  26.    if(conditionLoadJQuery == true)
  27.    {
  28.       ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "showMyDialog();", true);
  29.    }
  30. }


Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)

Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus