HI,
I placed rad window control in asp.net user control page and trying to load a url in that radwindow
As Technically its difficult to have javascript in user control i placed in a JS file and loaded that file with Master Page load event.
But Now my problem I'm unable to find the radwindo and also unable to open the url in the window.
Please help me in this regards. Plz find my code snipplet.
Below is my Button click event code in Asp.Net User Control
and My below is my JS Code
Regards
Phaneendra Varanasi
I placed rad window control in asp.net user control page and trying to load a url in that radwindow
As Technically its difficult to have javascript in user control i placed in a JS file and loaded that file with Master Page load event.
But Now my problem I'm unable to find the radwindo and also unable to open the url in the window.
Please help me in this regards. Plz find my code snipplet.
Below is my Button click event code in Asp.Net User Control
protected
void
lnkGenearateFull_Click(
object
sender, EventArgs e)
{
string
url =
"~/AppUI/Payments/ReportExport.aspx"
;
Page pg = (Page)System.Web.HttpContext.Current.Handler;
ScriptManager.RegisterStartupScript(pg,
typeof
(Page),
"openWindow"
,
"openWindow('"
+ url +
"','"
+ radWindow.ClientID +
"');"
,
true
);
ScriptManager.RegisterStartupScript(pg,
typeof
(Page),
"CloseWindow"
,
"CloseWindow();"
,
true
);
}
function
openWindow(url, radwinId) {
alert(url);
alert(radwinId);
var
window = $find(radwinId);alert(window);
window.setUrl(url);
window.show();
}
function
CloseWindow() {
var
window = $find(
'<%= radWindow.ClientID %>'
);
if
(window !=
null
) {
window.close();
}
}
Regards
Phaneendra Varanasi