S
Shapper
Hello,
I have this loop:
For Each row As DataRow In dsContent("pagename").Tables(0).Rows
Dim div As HtmlGenericControl =
CType(Page.FindControl(row("tag_name").ToString), HtmlGenericControl)
If row("content").ToString <> "" Then
div.InnerHtml = row("content").ToString
Else
div.InnerHtml = " "
End If
Next
dsContent("pagename") is a function which returns a dataset where @page
= "pagename"
The strange thing is when there are no records with "pagename" I get na
error in:
div.InnerHtml = row("content").ToString
But why is the For loop running if there are no records.
This is very strange.
Any idea?
Thanks,
Miguel
I have this loop:
For Each row As DataRow In dsContent("pagename").Tables(0).Rows
Dim div As HtmlGenericControl =
CType(Page.FindControl(row("tag_name").ToString), HtmlGenericControl)
If row("content").ToString <> "" Then
div.InnerHtml = row("content").ToString
Else
div.InnerHtml = " "
End If
Next
dsContent("pagename") is a function which returns a dataset where @page
= "pagename"
The strange thing is when there are no records with "pagename" I get na
error in:
div.InnerHtml = row("content").ToString
But why is the For loop running if there are no records.
This is very strange.
Any idea?
Thanks,
Miguel