Macromedia dreamweaver 8-using dreamweaver Manuel D’Utilisation

Page de 1030
914
Chapter 41:  Building ASP.NET Applications Rapidly
The DataGrid will appear the first time the search page loads even if the user hasn’t conducted 
a search yet. You can hide the DataGrid when the page loads the first time. 
Hiding the DataGrid the first time the page loads
When the search page first loads, you can hide the DataGrid that will be used to display the 
search results.
To hide the DataGrid the first time the page loads:
1.
Open the search page in Code view (View > Code).
2.
Immediately after the Register directive at the top of the page, enter the following code 
block if the page language is Visual Basic:
<script runat="server">
Sub Page_Load()
If Not IsPostBack Then 
dgName.Visible = false
Else
dgName.Visible = true
End If
End Sub
</script>
where 
dgName
 is the ID of your DataGrid.