Reputation: 125
After being exhausted with various post back and other issues related to modal popup ( ajax/jquery/javascript) we came up with a simple trick that seems to be working fine so far. We are to implement this in hundreds of other aspx files and we are afraid that this solution might come up with a issue in future so far not known to us. If some one can point out the potential issues we would really appreciate that.
On button click this is the code that fires up a pseudo popup: See this popup in action http://02e34b5.netsolhost.com/youtube/Zpopup.aspx
<asp:Panel ID="pseudopopup" runat="server" visible="false">
<table style="position: fixed; z-index: 1; left: 0px; top: 0px" border="0" width="100%" height="100%">
// position fixed is essential. div wont extend 100% in height but an html table would
// no background color hence everything behind tbl is visible but NOT clickable
<tr>
<td valign="top" align="center" >
// this would put a nice center aligned div with css shadow helping give it a popup shape
<div style=" width: 1000px; margin-top:80px; padding:10px; background-color: #FF00FF" id="layer2" class="roundshadow">
Grid goes here
Form view goes here
other stuff goes here
no need to worry about the postback
close button goes here that makes the panel visible = false
</div>
</td>
</tr>
</table>
</asp:Panel>
This has been so far working with out any issues. See this popup in action http://02e34b5.netsolhost.com/youtube/Zpopup.aspx
Upvotes: 0
Views: 1587
Reputation: 5056
It will work of course, but with some if
s. As a pure server-side method, this has all the cons and pros of such an approach.
pros:
cons:
ViewState
which makes the pages huge.Conclusion:
Upvotes: 1