0
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
 $("#btnclick").click(function(){
  $("#para").hide("slow");
  $("#btnclick").click(function(){
     $("#para").show("slow");
   });
  });
});
</script>

<body>
    <form id="form1" runat="server">
   <div id="para">
    <p>The form contains a button to place the final order. In this example, pressing the button returns a simple JavaScript alert(), depending on the contents of the order. In actual production, the order page could submit form data to a secondary page or code-behind class (ASP.NET Web Forms) for order processing. Alternatively, data could be formatted and sent directly back to an XML file or to a database using Ajax. Order processing could be done on the client- or server-side, depending on the technology implemented.
    </p>
    </div>
    <div id="btn">
     <asp:Button ID="Button1" runat="server" Text="Name" />
    </div>

i want to hide this paragraph but it is not work(not hide)
but when i use the <button id="btnclick">Click Me </button> this control it works fine but while using the asp.net server control it is not work
Please help me on this JQUERY

Edited by __avd: Added [code] tags.

3
Contributors
2
Replies
5
Views
6 Years
Discussion Span
Last Post by __avd
0

Obviously when you use the asp:Button its ID is set to "btnclick", right? Because it isn't in the code you posted above.

0

Try,

<asp:Button ID="Button1" runat="server" Text="Name" OnClientClick="return false;" />

Or Use html button

<input type="button" id="Button1" value="button"/>

PS:
Do wrap your programming code blocks within [code] ... [/code] tags.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.