Solved

Pop out a from from asp.net server side.

Posted on 2012-03-22
5
167 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now