Click here to Skip to main content
15,907,687 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: div controls outside of a repeater should be made invisible Pin
Scott529-Nov-16 7:59
Scott529-Nov-16 7:59 
GeneralRe: div controls outside of a repeater should be made invisible Pin
Scott529-Nov-16 9:57
Scott529-Nov-16 9:57 
GeneralRe: div controls outside of a repeater should be made invisible Pin
Richard Deeming9-Nov-16 10:38
mveRichard Deeming9-Nov-16 10:38 
QuestionMessage Closed Pin
9-Nov-16 2:00
Pk Fun Zone9-Nov-16 2:00 
AnswerRe: Design my Site?? Pin
Richard MacCutchan9-Nov-16 2:24
mveRichard MacCutchan9-Nov-16 2:24 
AnswerRe: Design my Site?? Pin
Peter Leow9-Nov-16 2:35
professionalPeter Leow9-Nov-16 2:35 
QuestionNeed help with showing tab info when first landing on page. Pin
Bootzilla336-Nov-16 11:28
Bootzilla336-Nov-16 11:28 
QuestionHow do layout out the columns using stringbuilder? Pin
samflex4-Nov-16 15:51
samflex4-Nov-16 15:51 
I am dynamically creating a PDf in memory and sending a PDF attachment via email.

This works fine.

What I am having problem with is presenting the data in the format management wants.

For instance, they would want the layout in following format:

SQL
John Doe                    12345
Employee Name                Employee ID


john doe
Signature

11/04/2016
Date

How do I fix the code below to accomplish this?

Thanks in advance

PHP
I have modified my request and narrowed the help I need to one specific issue.

I need to lay out the results to look similar to this sample below:


<pre><pre lang="PHP">
John Doe 12345

Employee Name Employee ID

john doe

Signature

11/04/2016

Date

So far, everything is wrapping to one column.

I am using stringbuilder.

How do I fix this?

SQL
Private Sub SendPDFEmail(dtb As DataTable)
    Using sw As New StringWriter()
        Using hw As New HtmlTextWriter(sw)
            Dim FullName As String = txtFullName.Text
            Dim user As String = txtUserName.Text
            Dim signedName As String = txtSignature.Text
            Dim lDate As String = txtDate.Text
            Dim sb As New StringBuilder()
            sb.Append("<table border = '0'>")
            sb.Append("<tr>")
            For Each column As DataColumn In dtb.Columns
                sb.Append("<th style = 'background-color: #ffffff;color:#000000'>")
                sb.Append(column.ColumnName)
                sb.Append("</th>")
            Next
            sb.Append("</tr>")
            For Each row As DataRow In dtb.Rows
                sb.Append("<tr>")
                For Each column As DataColumn In dtb.Columns
                    sb.Append("<td>")
                    sb.Append(row(column))
                    sb.Append("</td>")
                Next
                sb.Append("</tr>")
            Next
            sb.Append("</table>")
            sb.Append("<table width='100%' cellspacing='0' cellpadding='2'>")
            sb.Append("<tr><td align='center' style='background-color: #ffffff' colspan = '1'></td></tr>")
            sb.Append("<tr><td colspan = '3'>")
            sb.Append("" & FullName & "</td><td>" & user & "</td></tr>")
            sb.Append("<tr><td>Employee ID: </td><td>Employee Signature: ")
            sb.Append("</td></tr><tr><td colspan = '3'>")
            sb.Append("" & signedName & "")
            sb.Append("</td><td> </td></tr><tr><td>Employee Signature")
            sb.Append("</td><td> </td></tr>")
            sb.Append("<tr><td colspan = '2'>" & lDate & "</td><td> </td></tr>")
            sb.Append("<tr><td colspan = '2'>Date :</td><td> </td>")
            sb.Append("</tr>")
            sb.Append("</table>")
            sb.Append("<br />")


modified 5-Nov-16 8:25am.

AnswerRe: How do layout out the columns using stringbuilder? Pin
Richard MacCutchan4-Nov-16 22:52
mveRichard MacCutchan4-Nov-16 22:52 
GeneralRe: How do layout out the columns using stringbuilder? Pin
samflex5-Nov-16 2:33
samflex5-Nov-16 2:33 
QuestionGenerate SQL query Pin
Member 128253814-Nov-16 6:23
Member 128253814-Nov-16 6:23 
AnswerRe: Generate SQL query Pin
Richard MacCutchan4-Nov-16 6:58
mveRichard MacCutchan4-Nov-16 6:58 
QuestionOperation must use an updateable query - question Pin
Member 87616672-Nov-16 15:59
Member 87616672-Nov-16 15:59 
AnswerRe: Operation must use an updateable query - question Pin
Richard Deeming3-Nov-16 3:10
mveRichard Deeming3-Nov-16 3:10 
QuestionCrud operation by pattern Pin
Member 1282618731-Oct-16 20:27
Member 1282618731-Oct-16 20:27 
AnswerRe: Crud operation by pattern Pin
Nathan Minier1-Nov-16 2:12
professionalNathan Minier1-Nov-16 2:12 
AnswerRe: Crud operation by pattern Pin
F-ES Sitecore1-Nov-16 5:46
professionalF-ES Sitecore1-Nov-16 5:46 
QuestionSave Foreign Key Value - EF Core + ASP.NET Core Pin
vanilsonwdd31-Oct-16 19:43
vanilsonwdd31-Oct-16 19:43 
QuestionOptimal way to share data between MVC Controller and AngularJS Pin
L_Q31-Oct-16 10:50
L_Q31-Oct-16 10:50 
AnswerRe: Optimal way to share data between MVC Controller and AngularJS Pin
Nathan Minier1-Nov-16 2:25
professionalNathan Minier1-Nov-16 2:25 
GeneralRe: Optimal way to share data between MVC Controller and AngularJS Pin
L_Q1-Nov-16 2:42
L_Q1-Nov-16 2:42 
GeneralRe: Optimal way to share data between MVC Controller and AngularJS Pin
Nathan Minier1-Nov-16 3:11
professionalNathan Minier1-Nov-16 3:11 
QuestionMultiple Date Rages in Multi select Drop down list in HTML 5 using JQuery or AngularJS Pin
indian14331-Oct-16 6:25
indian14331-Oct-16 6:25 
QuestionFull crud operation in ASP.NET in a single page with dropdownlist, radio button and checkbox controls Pin
Member 1273685631-Oct-16 1:26
Member 1273685631-Oct-16 1:26 
GeneralRe: Full crud operation in ASP.NET in a single page with dropdownlist, radio button and checkbox controls Pin
Richard MacCutchan31-Oct-16 1:41
mveRichard MacCutchan31-Oct-16 1:41 

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.