Click here to Skip to main content
15,898,222 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: scrollbar colors Pin
Rickard Andersson2025-Sep-02 23:36
Rickard Andersson2025-Sep-02 23:36 
Questiongotdotnet.com "quote of the day" web service? Pin
zhoujun25-Sep-02 16:42
zhoujun25-Sep-02 16:42 
GeneralForce a stylesheet reload in IE Pin
Jan R Hansen25-Sep-02 10:53
Jan R Hansen25-Sep-02 10:53 
GeneralRe: Force a stylesheet reload in IE Pin
Roger Wright29-Sep-02 8:50
professionalRoger Wright29-Sep-02 8:50 
GeneralRe: Force a stylesheet reload in IE Pin
benjymous30-Sep-02 0:08
benjymous30-Sep-02 0:08 
QuestionHow can you map a network share in ASP with "net use" command? Pin
goddess_spanky25-Sep-02 5:55
goddess_spanky25-Sep-02 5:55 
AnswerRe: How can you map a network share in ASP with "net use" command? Pin
matthias s.29-Sep-02 21:40
matthias s.29-Sep-02 21:40 
GeneralDataRow error Pin
Rickard Andersson2025-Sep-02 4:09
Rickard Andersson2025-Sep-02 4:09 
I try to do this:

System.Data.DataSet dataSet = new System.Data.DataSet();
	dataSet.ReadXml("mp219.xml");
	
	System.Data.DataTable dataTable = dataSet.Tables[0];
	
	System.Data.DataRow dataRow = dataTable.Rows[--nr];
	
	Namn.Text = dataRow["Namn"];
	Bor.Text = dataRow["Stad"];
	Inriktning.Text = dataRow["Inriktning"];
	Presentation.Text = dataRow["Presentation"];


But I get this error:

Compiler Error Message: CS0029: Cannot implicitly convert type 'object' to 'string'

Source Error:

 

Line 116:	System.Data.DataRow dataRow = dataTable.Rows[--nr];
Line 117:	
Line 118:	Namn.Text = dataRow["Namn"];
Line 119:	Bor.Text = dataRow["Stad"];
Line 120:	Inriktning.Text = dataRow["Inriktning"];
 

Source File: C:\Documents and Settings\Administratör\Mina dokument\Unnamed Site 1\pre.aspx    Line: 118 



In a simple C# application it works well!
But when I run the same code in an ASP.NET webpage I get that error!!!! Mad | :mad:

Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!

UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!

GeneralRe: DataRow error Pin
Rickard Andersson2025-Sep-02 7:43
Rickard Andersson2025-Sep-02 7:43 
General<IFRAME> tag Pin
surfelport24-Sep-02 11:33
susssurfelport24-Sep-02 11:33 
GeneralRe: <iframe> tag Pin
Paul Watson24-Sep-02 20:50
sitebuilderPaul Watson24-Sep-02 20:50 
GeneralRe: <iframe> tag Pin
benjymous24-Sep-02 23:31
benjymous24-Sep-02 23:31 
GeneralRe: <iframe> tag Pin
Paul Watson25-Sep-02 0:18
sitebuilderPaul Watson25-Sep-02 0:18 
GeneralRe: <iframe> tag Pin
benjymous25-Sep-02 0:25
benjymous25-Sep-02 0:25 
GeneralJavascript: close window after printing Pin
AlexMarbus24-Sep-02 1:28
AlexMarbus24-Sep-02 1:28 
GeneralRe: Javascript: close window after printing Pin
Nick Parker24-Sep-02 2:58
protectorNick Parker24-Sep-02 2:58 
GeneralDQOTD Pin
leppie23-Sep-02 23:53
leppie23-Sep-02 23:53 
GeneralRe: DQOTD Pin
leppie23-Sep-02 23:58
leppie23-Sep-02 23:58 
Generalcss-color of scrollbars Pin
kelly_attrill23-Sep-02 15:28
kelly_attrill23-Sep-02 15:28 
GeneralRe: css-color of scrollbars Pin
Paul Watson23-Sep-02 21:43
sitebuilderPaul Watson23-Sep-02 21:43 
GeneralDatabase Question Pin
jpepper23-Sep-02 9:50
jpepper23-Sep-02 9:50 
GeneralRe: Database Question Pin
Paul Ingles24-Sep-02 12:56
Paul Ingles24-Sep-02 12:56 
GeneralPNG alpha channel support in IE6 Pin
Shog923-Sep-02 8:42
sitebuilderShog923-Sep-02 8:42 
GeneralRe: PNG alpha channel support in IE6 Pin
Paul Watson23-Sep-02 21:32
sitebuilderPaul Watson23-Sep-02 21:32 
GeneralRe: PNG alpha channel support in IE6 Pin
Shog924-Sep-02 5:21
sitebuilderShog924-Sep-02 5:21 

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.