Vamsi k

Vamsi k

  • NA
  • 296
  • 45.9k

Javascript function

Jan 25 2019 4:56 AM

var windowOptions = "dependent,width=450,height=400,scrollbars=no,resizable=yes,location=no";

function showDetails(t, c, v, b, d) { // added by ab37281 for Circuit Details

debugger;

window.name = "FFCL";

t = t.replace("&", "%26")

c = c.replace("&", "%26")

v = v.replace("&", "%26")

b = b.replace("&", "%26")

d = d.replace("&", "%26")

window.open(("circuitDetails.aspx?type=" + t + "&field=" + c + "&vendor=" + v + "&ban=" + b + "&billDate=" + d), "", windowOptions);

}

tC.Text = "<a href=javascript:showDetails('V','" + System.Web.HttpUtility.UrlEncode(dR["Stripped_Vendor_Circuit_ID"].ToString()) + "','" + System.Web.HttpUtility.UrlEncode(dR["vendor_name"].ToString()) + "','" + dR["Ban"].ToString() + "','" + System.Web.HttpUtility.UrlEncode(date1.ToString("yyyyMMdd")) + "');>" + dR["Stripped_Vendor_Circuit_ID"].ToString() + "</a>";

 hi all,
 
I want to call the above javascript window.open function using RowCommand Event of a Gridview can anyone please post the code  


The above code is written in table cell, But we have removed that table code and repalced Gridview, So i want the code same works like tc.Text in RowCommand event.

Gridview we have taken

<asp:TemplateField HeaderText="Vendor Circuit Id">

<ItemTemplate>

<asp:LinkButton ID="lnkVurl" Text=<%# Eval("Stripped_Vendor_Circuit_ID") %> CommandName="VendorURL" runat="server"></asp:LinkButton>               

</ItemTemplate>

</asp:TemplateField>

Please post your code or answers 

Answers (4)