Asp vs Asp.Net (Field access) 
Author Message
 Asp vs Asp.Net (Field access)

Hi,

  I don't know how to retrive the data value using C#;

Asp:
   rslogin.fields.getValue("username")
Asp.Net:
  ??

Thanks in advance!

Trevor Luo



Mon, 22 Nov 2004 20:32:07 GMT  
 Asp vs Asp.Net (Field access)
Trevor,

    You should be able to access it in the same manner, depending on what
the rslogin is.  I am assuming it is an ADO recordset.  If this is the case,
then I don't know how you are calling a getValue method, as there is no such
method.

    Also, in ASP.NET you might want to look into the System.Data namespace
and using the classes there.

    Hope this helps.

--
               - Nicholas Paldino [.NET MVP]


Quote:
> Hi,

>   I don't know how to retrive the data value using C#;

> Asp:
>    rslogin.fields.getValue("username")
> Asp.Net:
>   ??

> Thanks in advance!

> Trevor Luo



Mon, 22 Nov 2004 20:40:43 GMT  
 Asp vs Asp.Net (Field access)
Thank you Nicholas,

I use two ways to solve the problem.
Method 1:
private void Page_Load(object sender, System.EventArgs e){
// dsTQ1 is a DataSet
 DataTable dataTable = dsTQ1.Tables["TQ"];    
    foreach (DataRow dataRow in dataTable.Rows)
        {                                          
Response.Write (dataRow["VClearness"].ToString()
 );

Quote:
}

Method 2:
private void Page_Load(object sender, System.EventArgs e){
// dsTQ1 is a DataSet
DataRowView dv = dsTQ1.Tables["TQ"];
Response.Write(dv.Row.ItemArray[3].ToString().Trim());

Quote:
}

But they still are not the simple method, have a more
simple one? Please tell me!

Thanks in advacne!

Trevor Luo

Quote:
>-----Original Message-----
>Trevor,

>    You should be able to access it in the same manner,
depending on what
>the rslogin is.  I am assuming it is an ADO recordset.  

If this is the case,
Quote:
>then I don't know how you are calling a getValue method,
as there is no such
>method.

>    Also, in ASP.NET you might want to look into the

System.Data namespace
Quote:
>and using the classes there.

>    Hope this helps.

>--
>               - Nicholas Paldino [.NET MVP]



>> Hi,

>>   I don't know how to retrive the data value using C#;

>> Asp:
>>    rslogin.fields.getValue("username")
>> Asp.Net:
>>   ??

>> Thanks in advance!

>> Trevor Luo

>.



Mon, 22 Nov 2004 21:21:40 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Accessing ASP(not ASP.Net) built-in objects with C#

2. How to call VB.net and ASP.net programs in MFC?(or,asp call vc)

3. Integrated Session Management for ASP.NET and ASP 3.0

4. writing C# assambly for COM+ and use it by asp/vb/asp.net

5. need input ASP versus ASP.NET

6. ASP.NET (ADO.NET) connect to remote MS Access Database

7. .net server controls for access from asp.net

8. Emergency question on c# access remote Access Database from ASP.net

9. ASP.NET: Dynamically creating fillin field in a panel

10. How to clear the fields in ASP.NET

11. ASP.NET vs IPv6

12. ASP.NET Server Controls Vs Windows Forms UserControls

 

 
Powered by phpBB® Forum Software