Asp.net 2 - show webform as pop up form?
-
hello guys, i was wondering about the possibilities to show a web form as a pop up form (just for selection eg searching) and possibly get the ID of the selection when the user selects an item eg after search result Anyone ever tryed? thx
-
hello guys, i was wondering about the possibilities to show a web form as a pop up form (just for selection eg searching) and possibly get the ID of the selection when the user selects an item eg after search result Anyone ever tryed? thx
-
hi rahman, just a bit of javascript coding is needed. use window.open('mywindow','',formname.aspx,height=400,width=400) have good times. Tirthadip
Thank you, however I think I needed to provide bit more details in the first place ... ok, I have a page which is using a master page file. I want to click a button and then show another page eg 'popupform.aspx'. Can i call the code you provided from the code behinde of my original form? I kept it in the html portion as below: function ShowWindow() { window.open('mywindow','','formname.aspx',height='400',width='400') } asp:Button ID="Button1" runat="server" Text="Button" "OnClick"="ShowWindow" But it raises the error of: "Error 1 'ShowWindow' is not a member of 'ASP.getpostpage_aspx'." it looks like it down't like that javascript part. any ideas? PS: I kept onclcik inside double quites becuase it was not allowed in the message :) -- modified at 4:11 Friday 14th April, 2006
-
Thank you, however I think I needed to provide bit more details in the first place ... ok, I have a page which is using a master page file. I want to click a button and then show another page eg 'popupform.aspx'. Can i call the code you provided from the code behinde of my original form? I kept it in the html portion as below: function ShowWindow() { window.open('mywindow','','formname.aspx',height='400',width='400') } asp:Button ID="Button1" runat="server" Text="Button" "OnClick"="ShowWindow" But it raises the error of: "Error 1 'ShowWindow' is not a member of 'ASP.getpostpage_aspx'." it looks like it down't like that javascript part. any ideas? PS: I kept onclcik inside double quites becuase it was not allowed in the message :) -- modified at 4:11 Friday 14th April, 2006
Rahman Mahmoodi wrote:
asp:Button ID="Button1" runat="server" Text="Button" "OnClick"="ShowWindow"
<asp:Button ID="Button1" Runat="server" Text="Button"></asp:Button>
on Page_Load:Button1.Attributes["onclick"] = "ShowWindow(); return false;";
That way is used for server control. However, you just add an HTML control is OK. -
Rahman Mahmoodi wrote:
asp:Button ID="Button1" runat="server" Text="Button" "OnClick"="ShowWindow"
<asp:Button ID="Button1" Runat="server" Text="Button"></asp:Button>
on Page_Load:Button1.Attributes["onclick"] = "ShowWindow(); return false;";
That way is used for server control. However, you just add an HTML control is OK.Yes, Thank you. This one worked however the size is not working so it still shows the form as full screen but the max button is disabled.
-
Thank you, however I think I needed to provide bit more details in the first place ... ok, I have a page which is using a master page file. I want to click a button and then show another page eg 'popupform.aspx'. Can i call the code you provided from the code behinde of my original form? I kept it in the html portion as below: function ShowWindow() { window.open('mywindow','','formname.aspx',height='400',width='400') } asp:Button ID="Button1" runat="server" Text="Button" "OnClick"="ShowWindow" But it raises the error of: "Error 1 'ShowWindow' is not a member of 'ASP.getpostpage_aspx'." it looks like it down't like that javascript part. any ideas? PS: I kept onclcik inside double quites becuase it was not allowed in the message :) -- modified at 4:11 Friday 14th April, 2006