In a vb.net 2010 web form application the user loads 'template letters' to a web interface, that they can modify letters sent out to various customers to generate various late pay notifications. The user basically selects the 'template letter' they want to generate for a specific customer, and hits the 'save' button.

 The web interface has the tabs for 'preview', 'html', and 'design' as the bottom of 
   editor.      These tabs are not part of any custom code, they must be part of a web 
  interface that is inherited.

  The values for the editor are stored in a sql server 2012 database in a field 
  called 'strTemplate' and the value is actually html. 

  The problem is once the html value for 'strTemplate' is loaded for the user to 
   edit, extra  blank lines are loaded between different parts of  the 'templates.            
   Basically extra <br></br> tags are generated.

 When the user hits the save button, more <br></br> tags are generated between the various parts 
 of the letter.

 I do not want these extra blank lines to be generated.

 I have gone into the html tab, removed the <br></br> tags and hit the save button. 
  The extra tags are still generated.
 I have stepped through the code to find where the tags are generated and can not find it.

 Thus can you tell me what I can do to not have the extra  <br></br> tags generated?

 The following is some of the code that is used when accessing the part of that gets to the web
 interface:   
Imports System.Data
 Imports System.Reflection
 Imports System.Windows.Forms
 Imports Telerik.Web.UIImports System.Web.Script.Services
 Imports System.Web.Script.Serialization
 Imports System.Web.Services
 Partial Class edittemplates_default
 Inherits System.Web.UI.Page
Protected _master As MasterPage
#Region "Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) 

Handles MyBase.Load"
 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 

  MyBase.Load        _master = CType(Page.Master, MasterPage)
     _master.PageTitle = "Edit Templates"        If Not Page.IsPostBack Then
         If (SiteUserManager.SessionUser IsNot Nothing) Then                LoadTemplates()   


             LoadVariables()

         Else                'pnlEditor.Enabled = False
             'pnlEditor.Visible = False            End If
     End If        Master.Page.Title = "Login"    End Sub
 #End Region#Region "Protected Sub LoadTemplates()"
 Protected Sub LoadTemplates()
     Dim et As EditTemplates = New EditTemplates()
     Dim dt As DataTable = et.SelectTemplates()        For i = 0 To dt.Rows.Count() - 1
         ddlTemplates.Items.Add(New ListItem(dt.Rows(i)(dt.Columns(1).ColumnName()), dt.Rows

  (i)(dt.Columns(0).ColumnName())))
     Next    End Sub
  #End Region
  #Region "Protected Sub LoadVariables()"
 Protected Sub LoadVariables()
     Dim et As EditTemplates = New EditTemplates()
     Dim dt As DataTable = et.SelectAtnLtrVariables()        For i = 0 To dt.Rows.Count() - 1
         rlbVariables.Items.Add(New RadListBoxItem(dt.Rows(i)(dt.Columns(1).ColumnName()), 

 dt.Rows(i)(dt.Columns(0).ColumnName())))
     Next    End Sub
 #End Region
#Region "Protected Sub btnSaveTemplate_Click(ByVal sender As Object, ByVal e As 

 System.EventArgs) Handles btnSaveTemplate.Click"
 Protected Sub btnSaveTemplate_Click(ByVal sender As Object, ByVal e As System.EventArgs) 

 Handles btnSaveTemplate.Click
     Dim et As EditTemplates = New EditTemplates()
     If ddlTemplates.SelectedValue <> 0 Then
         et.UpdateTemplate(ddlTemplates.SelectedValue, ddlLanguage.SelectedValue, 

 rEditor.Content.ToString())
     End If
 End Sub
 #End Region
-------------------
Partial Class edittemplates_default
Inherits System.Web.UI.Page

Protected _master As MasterPage
-----------

Related posts

Recent Viewed