Click to See Complete Forum and Search --> : calling a window form in asp.net
jiahui84
12-14-2005, 10:29 AM
Hi, do anyone know how to call (when the user click on the button) a window application form in asp.net a not. Bec i need to have a popup dialog box to let the user enter in some value, as what i know is that javascript can do the prompting of messagebox but it is one qns by another. i have design a window form but i cannot call it out in asp.net.
Cipher
12-14-2005, 11:06 AM
Try this out
Sub Page_Load
'the button that calls the openWindow function
WindowButton.Attrubutes.Add("onClick", "newWin()")
End Sub
<script type="text/javascript">
function newWin() {
window.open("winURL", "popUpWin", "toolbar=0,location=0,directories=no,status=0,menubar=0,scrollbar=0,resizable=0,width=,height=");
}
</script>
jiahui84
12-16-2005, 10:13 AM
Sorry to ask another qns regarding the same qns, the method that you had given me do work by opening up a new window but what i need is that i have created a window application form in vb.net myself and how am i going to call the form out in asp.net.
Cipher
12-16-2005, 03:11 PM
you will have also to use js to do so, you can try this
function add() {
opener.form1.TextBox1.value = form2.TextBox1.value;
if (f2.Names.selectedIndex == 0) opener.f1.Text1.value = "";
}
<input type="button" value="Add" onClick="add()" runat="server">
This code assuming you have in the main page a TextBox1 in form with ID "form2" and in the popup window you have TextBox1 in form named "form1".
Hope this helps;
wmain
01-19-2006, 04:14 AM
What you are attempting to do is execute an exe file (your compiled VB.NET Windows Form Application) from the browser. This is not valid under current browser technology as it breaks all of the client security rules.
redfox
02-02-2006, 03:00 AM
use modalDialogbox