I am using Silverlight business application. At home page using HtmlPlaceHolder. My home page url is as follows.
http://localhost:52878/HTMLPlaceHolderBusinessApplicationTestPage.aspx#/Home
- How can I set ‘windowless=true’?
I have used following code from your example but not working for me.
if (!Application.Current.Host.Settings.Windowless)
{
string newUrl;
newUrl = HtmlPage.Document.DocumentUri.AbsoluteUri.Replace(HtmlPage.Document.DocumentUri.Fragment, string.Empty);
newUrl = string.Format("{0}?windowless=true{1}", newUrl, HtmlPage.Document.DocumentUri.Fragment);
HtmlPage.Window.Navigate(new Uri(newUrl, UriKind.Absolute));
}
Output of this code is http://localhost:52878/HTMLPlaceHolderBusinessApplicationTestPage.aspx?windowless=true#/Home
- Can I open Asp.net page in HTMLPlaceHolder?
- Can HtmlPlaceholder help in passing parameters to associated ASP.Net page.
5 Answers, 1 is accepted
Can I open Asp.net page in HTMLPlaceHolder?
Yes, you can absolutely use an aspx page as a SourceUrl for RadHtmlPlaceholder.
Can HtmlPlaceholder help in passing parameters to associated ASP.Net page.
Yes, you can pass parameters to the page which is displayed by RadHtmlPlaceholder. However, you need to make the page aware of parameters. For example, in our QSF the Default.aspx page has the following piece of code which is aware of the windowless parameter:
<
div
id
=
"silverlightControlHost"
>
<
object
data
=
"data:application/x-silverlight-2,"
type
=
"application/x-silverlight-2"
width
=
"100%"
height
=
"100%"
>
<
param
name
=
"source"
value="<%= Examples.Web.Global.Version %>/Examples/QuickStartUI.xap" />
<
param
name
=
"onSourceDownloadProgressChanged"
value
=
"onSourceDownloadProgressChanged"
/>
<
param
name
=
"onError"
value
=
"onSilverlightError"
/>
<
param
name
=
"background"
value
=
"#f2f2f2"
/>
<
param
name
=
"minRuntimeVersion"
value
=
"4.0.50826.0"
/>
<
param
name
=
"autoUpgrade"
value
=
"true"
/>
<
param
name
=
"EnableRedrawRegions"
value
=
"false"
/>
<% if (!string.IsNullOrEmpty(Request.QueryString["windowless"]))
{ %>
<
param
name
=
"windowless"
value
=
"true"
/>
<% } %>
<
param
name
=
"HtmlAccessEnabled"
value
=
"true"
/>
</
object
>
<
iframe
id
=
"_sl_historyFrame"
style="visibility: hidden; height: 0px; width: 0px;
border: 0px"></
iframe
>
</
div
>
More information on RadHtmlPlaceholder, you can find here.
All the best,
Kiril Stanoev
the Telerik team
It will be great if you provide few line of code for parameter passing/receiving from silverlight codebehind file to Asp.net page (embedded in HtmlPlaceholder).
Actually the ASPX page within the HtmlPlaceholder should be aware of the URL and process it as it likes. The HtmlPlaceholder should only be setting the URL or it is something else you have in mind?
All the best,Kiril Stanoev
the Telerik team
I am setting url as follows. In ASPX page load event I want some values from silverlight page.
Uri
uri = new Uri(Application.Current.Host.Source, "../../ReportViewr.aspx");
this.htmlPlaceholder1.SourceUrl = uri;
Please take a look at the attached project and let me know if it helps.
Greetings,Kiril Stanoev
the Telerik team