| | |
Exit code and prompting message box
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jun 2007
Posts: 19
Reputation:
Solved Threads: 0
i got the exit code. i am writing here if it helps anyone..
this will be written within button click event
And also like below we can write by assigning attribute.
This we will write in page load event
This both codes will close the window we are using on clicking the exit button.
But still i dont noabout message box with taking the input from user can anyone help me in that...
this will be written within button click event
ASP.NET Syntax (Toggle Plain Text)
Response.Write("<script>window.close();</script>")
This we will write in page load event
ASP.NET Syntax (Toggle Plain Text)
Button1.Attributes.Add("OnClick", "window.close();")
But still i dont noabout message box with taking the input from user can anyone help me in that...
•
•
Join Date: Jun 2007
Posts: 2
Reputation:
Solved Threads: 1
•
•
•
•
hello everyone,
how to write exit code in visual studio.Net so that whole program closes on button click event?
And how Message box is created, also how to take input from user as we do in javascript using prompt command?
Can anyone help me in this.....
Thanx in advance.
hi ruhi
this is naman.
well your quest is very nice.
if you r talking about vb.net then there is one function "END()"
write it in to the button click event.
and for the message box.
there is one function "msgbox("your message")" write it anywhere in any button click or the page load event.
•
•
Join Date: Jun 2007
Posts: 19
Reputation:
Solved Threads: 0
Actually i m using visual studio .net but thanks for your reply naman and i just got the answer.If any one would like to refer...
In the parent page we will have say one textbox and one button then the code for it is
parent.aspx
in html code we have
and parent.aspx.vb
in page load event we will write
And suppose child page
child.aspx
if it contains one textbox and two buttons again in html window
and child.aspx.vb will have in the page load event
Complete.
In the parent page we will have say one textbox and one button then the code for it is
parent.aspx
in html code we have
ASP.NET Syntax (Toggle Plain Text)
<asp:TextBox id="first" style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 24px" runat="server"></asp:TextBox> <asp:Button id="Input" style="Z-INDEX: 102; LEFT: 176px; POSITION: absolute; TOP: 24px" runat="server" Text="Open..."></asp:Button>
in page load event we will write
ASP.NET Syntax (Toggle Plain Text)
Input.Attributes.Add("onclick", "var strReturn; strReturn=window.showModalDialog('child.aspx',null,'status:no;dialogWidth:370px;dialogHeight:220px;dialogHide:true;help:no;scroll:no');if (strReturn != null) document.getElementById('first').value=strReturn;")
And suppose child page
child.aspx
if it contains one textbox and two buttons again in html window
ASP.NET Syntax (Toggle Plain Text)
<asp:TextBox id="second" style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 24px" runat="server"></asp:TextBox> <asp:Button id="btnOK" style="Z-INDEX: 103; LEFT: 48px; POSITION: absolute; TOP: 56px" runat="server" Text="Ok" Width="56px"></asp:Button> <asp:Button id="btnCancel" style="Z-INDEX: 102; LEFT: 112px; POSITION: absolute; TOP: 56px" runat="server" Text="Cancel"></asp:Button>
ASP.NET Syntax (Toggle Plain Text)
btnOK.Attributes.Add("onclick", "window.returnValue = document.getElementById('second').value; window.close();") btnCancel.Attributes.Add("onclick", "window.close();")
![]() |
Similar Threads
- Custom Message Box (Visual Basic 4 / 5 / 6)
- message box (ASP.NET)
- Message Box Switch Statement (Java)
- repeating the whole program after pressing Yes button in the confirmation message box (Java)
Other Threads in the ASP.NET Forum
- Previous Thread: plz help me out soon
- Next Thread: Import Data From Excel
| Thread Tools | Search this Thread |
.net activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net box browser button c# cac checkbox click commonfunctions control css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownlist dynamic dynamically edit embeddingactivexcontrol expose fileuploader fill findcontrol flash formatdecimal formview gridview gudi iframe iis javascript listbox login microsoft mono mouse mssql multistepregistration news novell numerical objects opera panelmasterpagebuttoncontrols radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers





