DataGrid - Reading values when Items.Count=1

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Fred Nelson (fred_at_smartybird.com)
Date: 07/23/04


Date: Fri, 23 Jul 2004 11:20:26 -0400

Hi:

I have a VB.NET web app and in one section I'm creating a datagrid that
lists several id's and names - I would like to be able to send the user to
another web page if only one record matches the search criteria:

The class lib returns two fields "custid" and "custname" - I need to obtain
the custid to go to the next web page.

=======

dim lookup function as new getcusts.search

DataGrid1.DataSource = lookup.searchnames(getinformation)
DataGrid1.DataBind

if DataGrid1.Items.Count = 1

    // get the value and use it to go to another web page.

    response.redirect("nextpage.aspx?custid=" + custidvalue.tostring)

end if

Any help would be greatly appreiciated - I haven't found a way for this to
work!

Thanks,

Fred



Relevant Pages

  • RE: DataGrid - Reading values when Items.Count=1
    ... "Fred Nelson" wrote: ... > I have a VB.NET web app and in one section I'm creating a datagrid that ... > lists several id's and names - I would like to be able to send the user to ...
    (microsoft.public.dotnet.languages.vb)
  • RE: DataGrid - Reading values when Items.Count=1
    ... "Fred Nelson" wrote: ... > I have a VB.NET web app and in one section I'm creating a datagrid that ... > lists several id's and names - I would like to be able to send the user to ...
    (microsoft.public.dotnet.languages.vb)
  • Re: DataGrid question for C#
    ... For the ASPNET datagrid is a special form, if that is not active anymore ... Footer Template and I have two drop-down lists. ... I have no problem populating the Regions Dropdown list. ...
    (microsoft.public.dotnet.general)
  • Re: Reading rows and columns from a DataGrid
    ... if he is developing a win or web app. ... using the win datagrid but I'm pretty sure it can be done. ... ITOH, you know for a fact that the datasource is iterable, so you could use ... > iterate through the data. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: paging a nested datalist
    ... level datagrid and you might find the information helpful. ... First get the item then check the item commandname and commandargument to ... i assume you are using custom paging. ... > changes the page on all of the lists. ...
    (microsoft.public.dotnet.framework.aspnet)