(When values are availabe in HTML i.e In Eval)
------------------------------------------------
<link href="../highslide/highslide.css" rel="stylesheet" type="text/css" />
<script src="../highslide/highslide-with-html.js" type="text/javascript"></script>
-------------------------------------------------
<script type="text/javascript">
hs.graphicsDir = '../highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.wrapperClassName = 'draggable-header';
</script>
---------------------------------------
<asp:TemplateField>
<ItemTemplate>
<%-- <a href='viewZipCode.aspx?s=<%#Eval("TState")%>&c=<%#Eval("TCounty") %>'>view Zipcodes</a>--%>
<a class="textbidtip" href='viewZipCode.aspx?s=<%#Eval("TState")%>&c=<%#Eval("TCounty") %>'
onclick="return hs.htmlExpand(this, { objectType: 'iframe' } )">View Zip </a>
</ItemTemplate>
</asp:TemplateField>
------------------------------------
**********************************************************
TO CLOSE IFRAME FROM A BUTTON INSIDE IT
AND TO REDIRECT TO ANOTHER PAGE AFTER SUBMIT FROM IFRAME
<tr>
<td align="right" style="width: 50%">
<asp:ImageButton ID="btnSubmit" ImageUrl="~/images/submit_btn.jpg" runat="server"
ValidationGroup="R" ToolTip="Submit" OnClick="btnSubmit_Click" />
</td>
<td align="left" style="width: 50%; padding-left: 30px;">
<input id="Button1" type="button" style="background-image: images/cancel_btn.jpg;"
value="Cancel"
onclick="javascript:parent.window.hs.close();" />
<img src="images/cancel.png" runat="server" onclick="javascript:parent.window.hs.close();" />
</td>
</tr>
(redirect to another page on submit)
-----------------------------------------------------
protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
{
string scriptString = "<script language=JavaScript>" +
"window.opener.document.forms(0).submit(); window.close();</script>";
if (!Page.ClientScript.IsClientScriptBlockRegistered(scriptString))
{
Page.ClientScript.RegisterClientScriptBlock(this.GetType(),
"script", scriptString);
}
Response.Write("<script>window.top.location=\"ManageTheme.aspx\"</script>");
}
0 comments:
Post a Comment