// On the button control, inside the event
// Check if indicating to continue or intercept, open the popup,
// and define the callback with the "sender" (the button itself)
if (!(bool)Session["IsAllowed"])
{
// Open popup to enter the password, and define a callback
Page.RegisterStartupScript(
"openwindow", "<script>window.open('http://myurl.aspx'" +
",'title');" +
"myPage_Callback = function(){" +
Page.GetPostBackEventReference((System.Web.UI.Control)sender,"") +
"};" +
"</script>"
);
return;
}
// On popup window, on event of the submit button
// Calls the __doPostBack callback js function on the opener and closes the popup.
Session["IsAllowed"] = true;
Page.RegisterStartupScript(
"closewindow", "<script>window.opener.window.myPage_Callback();" +
"window.close();" +
"</script>"
);
tags / categories
c#
csharp
linq
tsql
python
asp.net
fix
Xml
webservice
asp net web config
javascript
bat
sql
vim
asp
vb.net
wcf
command line
dot.net
ldap
bablo
xsl
active directory
configuration
ienumerable
regexp
vb6
ajax
android
blogging
fun
jquery
transformation
AOS
GC
bowser
datacontext
excel
installation
links
powershell
rdp
ruby
serialization
sql server stored procedure
ssh
tam foundation server; control version
tfs
threading
Analysis Services
AutoHotkey
FxCop
H1B
XmlDictionaryReaderQuotas
actionscript
air
chm
circular reference error
control version
flex
google
icons
ie
iis
join
pdf
php
resources
serviceModel
ssl
tdd
text processing
xsd
postback example in asp.net
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment