Help A Brutha Out

Kzuywmtigoyaw

New Member
Here is my code and for some reason when I call the LabelMsg subprocedure it doesn't display the text in the label. Can anyone help a brutha out?<BR><BR> Private Sub LabelMsg()<BR> lblHere.Text = "Hello Jon"<BR> End Sub<BR> Private Sub ExportToFile(ByRef dataset As Object)<BR> Dim row, field As Integer<BR> Dim data As String<BR> Dim strDoeCode, strEntityCode, strDoeDesc As String<BR> Dim r As dsTest.REF_DOERow<BR> 'set EMPLOYER M to 0 and set the pay date w/ formatting<BR> 'Clear the output buffer<BR> 'create file for export<BR> 'header line<BR> data = http://aspmessageboard.com/archive/index.php/"This is the Header! YIPPEEE!"<BR> 'the writeline function automatically does a vbCrLf for you<BR> 'write first line heading<BR> Dim objTextWriter As TextWriter<BR> objTextWriter = File.CreateText(Server.MapPath("EXPORTTEST.txt"))<BR> objTextWriter.WriteLine(data)<BR> data = Nothing<BR> For row = 0 To dataset.Rows.Count - 1<BR> r = dataset.rows(row)<BR> strDoeCode = r.DOE_CODE<BR> strEntityCode = r.ENTITY_CD<BR> strDoeDesc = r.DOE_DESC<BR> 'write the line to a file<BR> data &= "DOE Code = " & strDoeCode & ", Entity Code = " & strEntityCode & ", DOE Description = " & strDoeDesc<BR> objTextWriter.WriteLine(data)<BR> data = Nothing<BR> Next<BR> objTextWriter.Close()<BR> LabelMsg()<BR> End Sub<BR>Where is the label?<BR><BR>You sure you don't have a Page_Load sub in there that<BR>is overwriting the LabelMssg() Sub?<BR>Is the label set to visible="false" by default?<BR>If so, set it to true.<BR><BR>Private Sub LabelMsg()<BR>lblHere.Text = "Hello Jon"<BR>lblhere.visible = "true"<BR>End Sub<BR><BR><BR>MThere is nothing overwriting it and the default visible is set to true. Yeah I am completely stumped...How BizarrePlace a <BR>response.write("Test")<BR>Response.end()<BR><BR>inside your label function... if the page shows up white with the word test then you know your function is being called and the label is being set... if it doesnt show up then its not being called. If it is being called and the label isnt showing then its probably being hidden somehow... maybe you got it inside another control or something or the html itself is hiding it... like a malformed table or somethingIs this code in the codebehind or the aspx page? If it's in the codebehind, then do you have the control properly declared like:<BR><BR>Protected WithEvents lblHere As System.Web.UI.WebControls.LabelI checked the HTML and there is nothing out of the ordinary. It is calling the subprocedure but for some reason the label is not showing the text. I am at a total loss, but I appreciate the feedback and any other suggestions you might have.Yeah it is in there.
 
Back
Top