ASP.Net 2005

 

Cross Page Posting

 

 

Nice Tip and or Trick…

<%@ Page Language="VB" MaintainScrollPositionOnPostBack="true" %>

 

 

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    Dim c As String = ConfigurationManager.ConnectionStrings("MyDBConnectionString").ConnectionString

    SqlDataSource1.ConnectionString = c

    SqlDataSource1.SelectCommand = "SELECT * FROM [Candidate] Where Name_Last = 'Schimsky'"

    GridView1.DataSourceID = SqlDataSource1.ID

End Sub