Click here to Skip to main content
15,912,756 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: question Pin
Parwej Ahamad14-Aug-09 0:03
professionalParwej Ahamad14-Aug-09 0:03 
GeneralRe: question Pin
farokhian14-Aug-09 0:53
farokhian14-Aug-09 0:53 
QuestionThere is not row at position 0 Pin
haleemasher13-Aug-09 23:29
haleemasher13-Aug-09 23:29 
AnswerRe: There is not row at position 0 Pin
padmanabhan N13-Aug-09 23:35
padmanabhan N13-Aug-09 23:35 
GeneralRe: There is not row at position 0 Pin
haleemasher13-Aug-09 23:40
haleemasher13-Aug-09 23:40 
GeneralRe: There is not row at position 0 Pin
padmanabhan N13-Aug-09 23:42
padmanabhan N13-Aug-09 23:42 
GeneralRe: There is not row at position 0 Pin
haleemasher13-Aug-09 23:52
haleemasher13-Aug-09 23:52 
AnswerRe: There is not row at position 0 Pin
Abhishek Sur13-Aug-09 23:58
professionalAbhishek Sur13-Aug-09 23:58 
I suggest you to always check count before fetching indexed elements.

if(ds.Tables.count >0)
{
  if(ds.Tables[0].Rows.count > 0)
  {
     if(ds.Tables[0].Columns.Count >=2)
     {

        txtSFrom.Text = ds.Tables[0].Rows[0][0].ToString();
        Txtprice.Text = ds.Tables[0].Rows[0][1].ToString();
     }
  }
}


like this. Rose | [Rose]

Abhishek Sur

My Latest Articles
Create CLR objects in SQL Server 2005
C# Uncommon Keywords
Read/Write Excel using OleDB

Don't forget to click "Good Answer" if you like to.

GeneralRe: There is not row at position 0 Pin
haleemasher14-Aug-09 0:02
haleemasher14-Aug-09 0:02 
GeneralRe: There is not row at position 0 Pin
Abhishek Sur14-Aug-09 0:14
professionalAbhishek Sur14-Aug-09 0:14 
QuestionJS not working in Mozila Pin
janani1313-Aug-09 23:21
janani1313-Aug-09 23:21 
AnswerRe: JS not working in Mozila Pin
padmanabhan N13-Aug-09 23:24
padmanabhan N13-Aug-09 23:24 
AnswerRe: JS not working in Mozila Pin
Parwej Ahamad13-Aug-09 23:27
professionalParwej Ahamad13-Aug-09 23:27 
AnswerRe: JS not working in Mozila Pin
Abhishek Sur13-Aug-09 23:29
professionalAbhishek Sur13-Aug-09 23:29 
QuestionThe Problem of DataList and ModalPopup extender Pin
123chaminda13-Aug-09 23:10
123chaminda13-Aug-09 23:10 
AnswerRe: The Problem of DataList and ModalPopup extender Pin
padmanabhan N13-Aug-09 23:22
padmanabhan N13-Aug-09 23:22 
QuestionDropdownlist Pin
mylogics13-Aug-09 23:09
professionalmylogics13-Aug-09 23:09 
AnswerRe: Dropdownlist Pin
padmanabhan N13-Aug-09 23:19
padmanabhan N13-Aug-09 23:19 
GeneralRe: Dropdownlist Pin
mylogics13-Aug-09 23:24
professionalmylogics13-Aug-09 23:24 
AnswerRe: Dropdownlist Pin
KhandelwalA13-Aug-09 23:20
KhandelwalA13-Aug-09 23:20 
AnswerRe: Dropdownlist Pin
Abhishek Sur13-Aug-09 23:22
professionalAbhishek Sur13-Aug-09 23:22 
Questionfocus Pin
AndyInUK13-Aug-09 23:01
AndyInUK13-Aug-09 23:01 
AnswerRe: focus Pin
Vimalsoft(Pty) Ltd13-Aug-09 23:04
professionalVimalsoft(Pty) Ltd13-Aug-09 23:04 
AnswerRe: focus Pin
padmanabhan N13-Aug-09 23:07
padmanabhan N13-Aug-09 23:07 
AnswerRe: focus Pin
Coding C#14-Aug-09 2:23
Coding C#14-Aug-09 2:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.