borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Process.Start)Next Topic (what is the use of DataBinder.Eval()) New Topic New Poll Post Reply
AndreaVB Forum : ASP.Net : Leading Zeros
Poster Message
MattA
Level: Whizz Kid

Registered: 13-08-2003
Posts: 15

icon Leading Zeros

I am creating a page which contains a table with numeric values and by using the following code

Response.ContentType = "application/vnd.ms-excel"
        Response.Charset = ""
        Me.EnableViewState = False

        Dim tw As New System.IO.StringWriter
        Dim hw As New System.Web.UI.HtmlTextWriter(tw)

        PlaceHolder1.RenderControl(hw)

        Response.Write(tw.ToString)

        Response.End()

I am displaying the information in excel format. The problem is any leading zeros are not displayed. Any help would be gratefully received.

15-11-2004 at 05:26 PM
View Profile Send Email to User Show All Posts | Quote Reply
MattA
Level: Whizz Kid

Registered: 13-08-2003
Posts: 15
icon Re: Leading Zeros

I sorted the problem in the end:

myCell.Controls.Add(New LiteralControl("=ASC(""" & myText & """)"))

mycell being the table cell.

04-01-2005 at 03:40 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : ASP.Net : Leading Zeros
Previous Topic (Process.Start)Next Topic (what is the use of DataBinder.Eval()) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder