Click here to Skip to main content
15,892,674 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: help me please with row colors (newbie) Pin
ransomed_guy1-Jun-06 0:42
ransomed_guy1-Jun-06 0:42 
QuestionShould i use placeholders? Pin
il_manti31-May-06 22:18
il_manti31-May-06 22:18 
GeneralRe: Should i use placeholders? Pin
User 17164921-Jun-06 7:22
professionalUser 17164921-Jun-06 7:22 
QuestionTable Cells "OnClick Event" Pin
Soroush_Sarabi31-May-06 21:37
Soroush_Sarabi31-May-06 21:37 
AnswerRe: Table Cells "OnClick Event" Pin
huguesgauthier1-Jun-06 1:48
huguesgauthier1-Jun-06 1:48 
QuestionHow make Menu Drop Down in PHP ? [modified] Pin
sovanngold31-May-06 19:13
sovanngold31-May-06 19:13 
AnswerRe: How make Menu Drop Down in PHP ? Pin
Steve Echols31-May-06 21:48
Steve Echols31-May-06 21:48 
Questionobject reference not set to instance of an object Pin
uglyeyes31-May-06 16:35
uglyeyes31-May-06 16:35 
Hi i am getting this message below are my aspx and vb codes please help me.


aspx page
--------------------
<datalist id="dlScHead">
ItemTemplate
<table>
<tr>
<td>.. ctype(DataBinder.Eval(Container.DataItem,"ScoreCardID"),string)..</td>
</tr>
</table>
datalist ID="dlScChart" DataSource=..(GetRecords(Cstr(DataBinder.Eval(Container.DataItem, "ScoreCardId")))) ..
ItemTemplate

/ItemTemplate

<table style="FONT-SIZE: 0.8em; font-face: Arial" cellPadding="5" width="100%" align="center"
border="0">
<tr>
<td colSpan="3">
<%# Server.htmlDecode(DataBinder.Eval(Container.DataItem,"Quarter1").tostring()) %>




<%# Server.htmlDecode(DataBinder.Eval(Container.DataItem,"Quarter2").tostring()) %>




<%# Server.htmlDecode(DataBinder.Eval(Container.DataItem,"Quarter3").tostring()) %>




<%# Server.htmlDecode(DataBinder.Eval(Container.DataItem,"Quarter4").tostring()) %>




</td>
</tr>
</table>
/ItemTemplate
/asp:datalist

and code behind
--------------------

in page load event i am doing

dlScHead.DataSource = GetRecords(Nothing)
dlScHead.DataBind()

and in function getRecords i am doing

Function GetRecords(ByVal scID As String) As SqlDataReader
Dim bizProgName As String = Request.QueryString("bizProgId")
Dim CommandText As String


Try
objConn = New SqlConnection(dbPath)
objConn.Open()

If scID = Nothing Then
Dim da As New SqlDataAdapter
da.SelectCommand = New SqlCommand
da.SelectCommand.Connection = objConn
da.SelectCommand.CommandText = "select scorecardId,bizProgId,scorecarddesc,businessgoal,strategy,quarter1,quarter2,quarter3,quarter4 from textData where bizProgID='" & Request.QueryString("bizProgId") & "'"
dr = da.SelectCommand.ExecuteReader(CommandBehavior.CloseConnection)
If dr.HasRows Then
'lblError.Text = ""
Else
'lblError.Text = "No records returned"
End If
GetRecords = dr

Else

cmd = New SqlCommand("select distinct measure_id from measuredata where scoreCardId = '" & scID & "'", objConn)
Dim da As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim dtid As New DataTable("measureid")

da.fill(dtid)

'select all columns with id
Dim cmd1 As SqlCommand = New SqlCommand("select * from measuredata where scorecardid = '" & scID & "'", objConn)

Dim da1 As SqlDataAdapter = New SqlDataAdapter(cmd1)
Dim dt As New DataTable("measuresource")

da1.Fill(dt)

Dim datarow As DataRow

For Each datarow In dtid.Rows
Dim chart As New DataGrid
Dim myview As New DataView(dt)

' dim chart as new mycos.mycoschartweb
myview.RowFilter = String.Format("measure_id='{0}'", datarow.Item("measure_id"))

chart.DataSource = myview
chart.DataBind()
Dim i As Integer
For i = 0 To dlScChart.Items.Count - 1
dlScChart.Items(i).FindControl("placeholder1").Controls.Add(chart)
Next
Next datarow


' GetRecords = PlaceHolder1.FindControl("placeholder1")


End If

Catch ex As Exception
Response.Write("error on child-- here" + ex.ToString + "
")
Finally



End Try
End Function

i am getting error in


dlScChart.Items(i).FindControl("placeholder1").Controls.Add(chart)



please help thanks

QuestionDisable scrolling in an iframe Pin
GalRatz31-May-06 8:06
GalRatz31-May-06 8:06 
QuestionHow to extract a pattern form a html file Pin
vikramjparekh31-May-06 5:07
vikramjparekh31-May-06 5:07 
AnswerRe: How to extract a pattern form a html file Pin
Paddy Boyd31-May-06 5:37
Paddy Boyd31-May-06 5:37 
AnswerRe: How to extract a pattern form a html file Pin
minhpc_bk31-May-06 15:55
minhpc_bk31-May-06 15:55 
QuestionMaskedTextBox in ASP.NET 2.0? Pin
Brent Lamborn31-May-06 4:17
Brent Lamborn31-May-06 4:17 
AnswerRe: MaskedTextBox in ASP.NET 2.0? Pin
minhpc_bk31-May-06 15:50
minhpc_bk31-May-06 15:50 
GeneralRe: MaskedTextBox in ASP.NET 2.0? Pin
Brent Lamborn1-Jun-06 3:56
Brent Lamborn1-Jun-06 3:56 
AnswerRe: MaskedTextBox in ASP.NET 2.0? Pin
Mihai Drebot1-Jun-06 0:50
Mihai Drebot1-Jun-06 0:50 
GeneralRe: MaskedTextBox in ASP.NET 2.0? Pin
Brent Lamborn1-Jun-06 3:57
Brent Lamborn1-Jun-06 3:57 
AnswerRe: MaskedTextBox in ASP.NET 2.0? Pin
Mihai Drebot1-Jun-06 4:02
Mihai Drebot1-Jun-06 4:02 
GeneralRe: MaskedTextBox in ASP.NET 2.0? Pin
Brent Lamborn1-Jun-06 4:04
Brent Lamborn1-Jun-06 4:04 
GeneralRe: MaskedTextBox in ASP.NET 2.0? Pin
Mihai Drebot1-Jun-06 4:04
Mihai Drebot1-Jun-06 4:04 
GeneralRe: MaskedTextBox in ASP.NET 2.0? Pin
Brent Lamborn1-Jun-06 8:59
Brent Lamborn1-Jun-06 8:59 
Questiontab control [modified] Pin
kh_neeru31-May-06 1:22
kh_neeru31-May-06 1:22 
AnswerRe: tab control [modified] Pin
Paddy Boyd31-May-06 4:39
Paddy Boyd31-May-06 4:39 
QuestionException Handling Pin
ZeroSaine30-May-06 22:02
ZeroSaine30-May-06 22:02 
AnswerRe: Exception Handling Pin
Paddy Boyd31-May-06 0:14
Paddy Boyd31-May-06 0:14 

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.