示例代码如下:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack Then SqlDataSource1.SelectParameters("City").DefaultValue = "Seattle" GridView1.DataSource = SqlDataSource1 GridView1.DataBind() End If End Sub