Solved

Pop out a from from asp.net server side.

Posted on 2012-03-22
5
171 Views
Last Modified: 2012-03-23
May be it is hard. I have an asp.net button. I want is to click the button then a designed form pops up.
The form's size is given, say 800*640. It has some text boxs and buttons. I want to fill the text fields and send them to the server.
Can we do that?


Jquery/asp.net???
0
Comment
Question by:zhshqzyc
  • 3
  • 2
5 Comments
 
LVL 7

Accepted Solution

by:
Lalit Chandra earned 500 total points
ID: 37753606
yes, Jquery made this simple for you.

1.  Just add the jquery and Jquery UI js reference to your page head section.
   <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
       

2.  Create the Div with the following markup
    <div id="divPopUp" style="display:none;">
         // Your Form Desing/MarkUP which you want to come as pop up.
     </div>  
 
3. Then, write something like the following

$("#yourButtonID").click(function() {
   $("#divPopUp").dialog({width:600,height:500});
});

Hope this will solve your issue.
0
 

Author Comment

by:zhshqzyc
ID: 37753662
What is the button ID here?
Suppose
 <div id="nav">
            <asp:Button ID="LookupTables" runat="server" Text="Lookup Tables"  /></div>

Open in new window

0
 
LVL 7

Expert Comment

by:Lalit Chandra
ID: 37753682
if you have normal aspx page then it will be  "LookupTables",
and if you are using Master Page,then you can simple add the cssClass="butNva" in the declration of button.
In this case  you simple replace the jquery first line

$("#yourButtonID").click(function() {
   $("#divPopUp").dialog({width:600,height:500});
});

TO

$(".butNva").click(function() {
   $("#divPopUp").dialog({width:600,height:500});
});

Make sure the name of the cssClass butNva is unique in the whole page.
0
 

Author Comment

by:zhshqzyc
ID: 37753740
<div id="nav">
            <asp:Button ID="LookupTables" runat="server" Text="Lookup Tables" CssClass="nav_buttons" />

Open in new window

It looks exciting. Can we add textboxs on the form? Any sample links?
0
 

Author Closing Comment

by:zhshqzyc
ID: 37757585
Let me try it, may come back.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jquery datatables, asp.net MVC 9 41
how can i apply an assert arrayEqual function ? 2 27
Google Maps API and PHP 25 30
Create an automated page index 9 16
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question