hi i am using asp.net..
in my aspx file i have declared this code in the page directive for output cache
i have added this table to my aspx page i also have a datagridCode:<%@ Outputcache duration="60" varybyparam="state" %>
in my aspx.vb file i have this codeVB Code:
<table cellspacing="0" cellpadding="3" rules="all" style="BORDER-LEFT-COLOR:black;BORDER-BOTTOM-COLOR:black;WIDTH:700px;BORDER-TOP-COLOR:black;BORDER-COLLAPSE:collapse;BACKGROUND-COLOR:#aaaadd;BORDER-RIGHT-COLOR:black"> <tr> <td><a href="webform1.aspx?state=germany">germany</a></td> <td><a href="webform1.aspx?state=mexico">mexico</a></td> <td><a href="webform1.aspx?state=uk">uk</a></td> <td><a href="webform1.aspx?state=sweden">sweden</a></td> <td><a href="webform1.aspx?state=canada">canada</a></td> <td><a href="webform1.aspx?state=france">france</a></td> <td><a href="webform1.aspx?state=italy">italy</a></td> <td><a href="webform1.aspx?state=portugal">portugal</a></td> </tr> </table>
VB Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here querystate = Request.QueryString("state") If querystate Is Nothing Then str = "SELECT * From Customers" Else str = "SELECT * From Customers Where Customers.Country= ' " + querystate + " ' " End If Dim adapt As New OleDbDataAdapter(str, myconn) Dim ds As New DataSet adapt.Fill(ds, "Customers") DataGrid1.DataSource = ds.Tables("customers").DefaultView DataGrid1.DataBind() End Sub
when the page loads my datagrid populates and even my table but
when i am clicking a link from the table which i have in the aspx file nothing shows up in my datagrid .. i have been on this for hours and dont know why.. can someone please explain this to me .. thanks guys...![]()




Reply With Quote