Click here to Skip to main content
15,897,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a problem of opening an .aspx page as a frame. I have a link button that is created at run time. If i click on that link i need to open another .aspx page as a frame. Since i am creating the link button at run time i could not open the .aspx page as a frame. Is there a way to open the .aspx page as a frame and not as a window. There is a function in javascript to open another page as a browser window that is "window.open()". And i need to open it by only using Javascript.

Do we have any function to open the .aspx page as as frame like "window.open()"?

Your answer will help me to solve my problems. Thank you in advance.
Posted

Dim JScrip As StringBuilder = New StringBuilder
Dim Location As String = Request.ApplicationPath & "/BugTrack/ViewCallDetails.aspx"
Location = Location & "?action=" & action
JScrip.Append("" & vbCrLf)
JScrip.Append(" var WinSettings = 'center:yes;resizable:no;dialogWidth:800pt;dialogHeight:500pt';")
JScrip.Append("window.showModalDialog('" & Location & "', window, WinSettings);")
'JScrip.Append("window.open('" & Location & "');")
JScrip.Append("")
Page.ClientScript.RegisterStartupScript(GetType(String), "ViewDetails", JScrip.ToString())
 
Share this answer
 
I finally found the solution to open an .aspx page as a frame at codebehind.

StringBuilder sb = new StringBuilder();
sb.Append("<table>");
sb.Append("<tr>");

for (int i = 0; i < tickers.Count; i++)
{
sb.Append("<td>");
sb.Append("<a id='lnkTicker" + tickers[i].TickerId + "' class='thickbox' href='ticker-detail/default.aspx?TickerId=" + tickers[i].TickerId + "&keepThis=true&TB_iframe=true&height=350&width=500' title='Ticker Details'><span style='COLOR: " + tickers[i].TickerColor + "'>" + tickers[i].TickerText + "&nbsp;&nbsp;<em>read more...</em>&nbsp;&nbsp;&nbsp;&nbsp;</span></a>");
sb.Append("</td>");
}
sb.Append("</tr>");
sb.Append("</table>");
Tickertbl.InnerHtml = sb.ToString();


Where 'tickers' is the bound list object and 'Tickertbl' is a
element tags id.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900