下面的代码应该怎么改才能让页面显示的不是空白?
Private Sub cmdSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSearch.Click
'Gridlist.CurrentPageIndex = 0
'dlapdept.SelectedValue = " "
'ddlRecdept.SelectedValue = " "
'txtRecLocation.Text = " "
'txtRecuser.Text = " "
'txtappdate.Value = " "
'txtOrder.Text = " "
'txtSaddress.Text = " "
'txtmeno.Text = " "
If txtSearchcode.Text = " " Then
Response.Write( " <script language= 'javascript '> alert( '搜索单号不能为空,请输入申请表主单号进行查询! '); </script> ")
'Response.Write( " <script language= 'javascript '> ")
'Response.Write( "alert( '搜索单号不能为空,请输入申请表主单号进行查询! '); ")
'Response.Write( " </script> ")
Exit Sub
End If
GridbindSerch()
Griddetailbindsearch()
End Sub
上面的语句在提示框跳出来的时候页面总全是白色的很难看,怎么改才能保持提示框跳出来时原来的页面还是显示以前的内容?
------解决方案-------------------- 'Response.Write( " <script language= 'javascript '> ")
to
'Response.Write( " <script language= 'javascript ' defer> ")
------解决方案--------------------Literal le = new Literal();
this.Controls.Add(le);
le.Text= " <script language= 'javascript '> alert( '搜索单号不能为空,请输入申请表主单号进行查询! '); </script> ";
------解决方案--------------------page.ClientScript.RegisterStartupScript(page.GetType(), "alert ",
"alert( '搜索单号不能为空,请输入申请表主单号进行查询! '); ",true);