62,267
社区成员
发帖
与我相关
我的任务
分享
//绑定链接
protected void CPSGridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
string plant = string.Empty;
string sloc = string.Empty;
string material = string.Empty;
string mvt = string.Empty;
string inorout = string.Empty;
if (e.Row.RowType == DataControlRowType.DataRow)
{
plant = e.Row.Cells[1].Text.Trim();
sloc = e.Row.Cells[2].Text.Trim();
material = e.Row.Cells[3].Text.Trim();
mvt = e.Row.Cells[6].Text.Trim();
inorout = e.Row.Cells[8].Text.Trim();
e.Row.Cells[3].Text = "<a href=\"javascript:OpenPage('" + plant + "','" + sloc + "','" + material + "','" + mvt + "','" + inorout + "')\">" + material + "</a>";
}
}
// JScript File
function OpenPage(plant,sloc,material,mvt,inorout)
{
var page="SSTDBDetail.aspx?Plant="+plant+"&SLoc="+sloc+"&Material="+material+"&Mvt="+mvt+"&InOrOut="+inorout ;
window.open (page, 'newwindow', 'height=500, width=1000, top=0, left=0, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=n o, status=no')
}
<asp:CommandField ButtonType="Button" HeaderText="添加新語言" ShowHeader="True" SelectText="Add" ShowSelectButton="True">
<HeaderStyle Width="1%" Wrap="False" />
<ItemStyle HorizontalAlign="Center" />
</asp:CommandField>
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Redirect("~/B.aspx?QID=" + aQid + "&Flag=1");
}