首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

:一个关于绑定按钮列弹出新页面的有关问题~百分相赠

2012-01-19 
求助:一个关于绑定按钮列弹出新页面的问题~百分相赠!我用DATAGRID绑定了一个按钮列,当点击该按钮时,要求打

求助:一个关于绑定按钮列弹出新页面的问题~百分相赠!
我用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( "onclick ", "window.open( 'Form/NoteEditForm.aspx?parm0= " + no ', ' ', 'statusbar=no;toolbar=no ') ")


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



[解决办法]
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
Page.RegisterStartupScript( "script ", " <script> window.open( 'Form/NoteEditForm.aspx?parm0= "+no+ " ', ' ', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollars=yes,resizable=no,copyhistory=yes, width=600,height=450,left=150,top=200 '); </script> ");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
[解决办法]
5楼

热点排行