Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

typed data set

Status
Not open for further replies.

CRuser89

Programmer
May 18, 2005
79
US
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");

}

}

}
}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top