Hello,
I am trying to learn typed data sets in VS2005. I have the following code behind. I am not sure if I'm calling the data sets correctly or not. I would also like to add a piece of code after the bold text below to check if the results return >1 then to redirect the user to a page called default.asp. Can someone please help me or direct me to a sample?
Thanks for your help,
Kathy
Code Behind
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.Security;
using System.Data.SqlClient;
using System.Configuration;
using UserTableAdapters;
namespace NorthWind
{
public partial class WebForm1 : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
private void submit_Click(object sender, System.EventArgs e)
{
if (Page.IsValid)
{
tblUserTableAdapter UserAdapter = new tblUserTableAdapter();
this.GridView1.DataSource = UserAdapter.GetUserCount("A","B");
}
}
}
}
I am trying to learn typed data sets in VS2005. I have the following code behind. I am not sure if I'm calling the data sets correctly or not. I would also like to add a piece of code after the bold text below to check if the results return >1 then to redirect the user to a page called default.asp. Can someone please help me or direct me to a sample?
Thanks for your help,
Kathy
Code Behind
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.Security;
using System.Data.SqlClient;
using System.Configuration;
using UserTableAdapters;
namespace NorthWind
{
public partial class WebForm1 : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
private void submit_Click(object sender, System.EventArgs e)
{
if (Page.IsValid)
{
tblUserTableAdapter UserAdapter = new tblUserTableAdapter();
this.GridView1.DataSource = UserAdapter.GetUserCount("A","B");
}
}
}
}