Hello all,
I have a problem to find a method to check whether the data is available in the table. I have a button called 'dashboard'. i would like to make something like thing
Protected Sub button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim id = Session("UsrId").ToString
if "id equal to a data inside table buyerdata column buyer_username" then
Response.Redirect("~/buyer_dashboard.aspx")
else
response.redirect("~/agent_dashboard.aspx)
End Subim already have sqldatasource inside the .aspx
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:epropertyConnectionString1 %>" SelectCommand="SELECT [buyer_username] FROM [buyerdata] WHERE ([buyer_username] = @buyer_username)" onselected="SqlDataSource1_Selected"><SelectParameters><asp:Parameter DefaultValue="" Name="buyer_username" Type="String" /></SelectParameters></asp:SqlDataSource>
I am still do not know how to do the : if "id equal to a data inside table buyerdata column buyer_username" then ......
thanks in advance