日期:2014-05-19  浏览次数:20520 次

求助:一个关于绑定按钮列弹出新页面的问题~百分相赠!
我用DATAGRID绑定了一个按钮列,当点击该按钮时,要求打开一个新页面并传递一个值同时不能覆盖掉原来的页面,代码如下:我需要如何修改~~请高手指点~~

  Private   Sub   DataGrid1_ItemCommand(ByVal   source   As   System.Object,   ByVal   e   As   System.Web.UI.WebControls.DataGridCommandEventArgs)   Handles   Datagrid1.ItemCommand
                        Dim   row   As   DataRow
                        Try
                                If   e.Item.ItemType   <>   ListItemType.Pager   Then
                                        If   e.CommandName   =   "Select "   Then
                                                Dim   no   As   String   =   e.Item.Cells(0).Text
                                                Response.Redirect( "Form/NoteEditForm.aspx?parm0= "   +   no,   True)
                                End   If
                                End   If
                        Catch   ex   As   Exception
                                MyLog.Log(LogLevel.ErrorLevel,   ex)
                                Message(ex.Message)
                        End   Try
                End   Sub

------解决方案--------------------
up
------解决方案--------------------
用JS来open一个不好吗?修改弹出页面的样式,就可以不显示状态栏,地址栏之类的了
------解决方案--------------------
页面上 <head> </head> 之间加
<SCRIPT LANGUAGE= "JavaScript ">
<!--
function winOpen(__URL)
{
window.open(__URL, "NewPage ", "toolbar=no,menubar=no,resizable=yes, scrollbars=yes,top=50px,left=100 ");
}
//-->
</SCRIPT>

Response.Redirect( "Form/NoteEditForm.aspx?parm0= " + no, True)

--> >

Page.RegisterStartupScript( "winop ", " <script> winopen( ' "+ "Form/NoteEditForm.aspx?parm0= " + no+ " '); </script> ");


------解决方案--------------------
If e.Item.ItemType <> ListItemType.Pager Then
If e.CommandName = "Select " Then
Dim no As String = e.Item.Cells(0).Text
Dim btnShow As Button = e.Item.Cells(0).FindControl( "BtnId ")
btnShow.Attributes.Add( &qu