Asp.net page degrades after postback

dean3862

New Member
Issue:After publishing my asp.net webpage to the server on the 2nd postback my formatting is lost along with some of the css stylingQuestion:What could be the cause of this as it does not happen on my development serverScreenshots:[*]Before
fUKqI.png
[*]After
vXHEQ.png
Page Code:[*]C#using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data;using System.Data.SqlClient;namespace AcuConvertWeb{ public partial class Validation : System.Web.UI.Page { private Utility Util; private SqlConnectionStringBuilder ConvertString;\[code\] protected void Page_Load(object sender, EventArgs e) { if (Session["Utility"] == null) Session.Add("Utility", null); if (Session["Utility"] != null) { Util = (Utility)Session["Utility"]; } else { Util = new Utility(); Session["Utility"] = Util; } } public Validation() { ConvertString = new SqlConnectionStringBuilder(); } protected void btnConversionConnect_Click(object sender, EventArgs e) { if (btnConversionConnect.Text.Equals("Run Data Validation")) { tblConversionConnect.BorderColor = System.Drawing.Color.Blue; if (Util.DataValidation().Rows.Count > 0) { gvErrorCompilation.DataSource = Util.DataValidation(); gvErrorCompilation.DataBind(); } else { tblConversionConnect.BorderColor = System.Drawing.Color.Yellow; } } else { ConvertString.UserID = txtConversionUN.Text; ConvertString.DataSource = txtSourceServer.Text; ConvertString.InitialCatalog = txtConversionDatabase.Text; ConvertString.Password = txtConversionPass.Text; if (Util.Connection(ConvertString, 2)) { tblConversionConnect.BorderColor = System.Drawing.Color.LawnGreen; btnConversionConnect.Text = "Run Data Validation"; } else { tblConversionConnect.BorderColor = System.Drawing.Color.Red; } } }}\[/code\]}[*]Asp.net \[code\]<ajaxToolkit:TabContainer ID="TabContainer2" runat="server" ScrollBars="Horizontal"><ajaxToolkit:TabPanel ID="tpConversionConnection" runat="server" HeaderText="Connection Properties" Enabled="true" ScrollBars="Auto" OnDemandMode="Once"> <ContentTemplate> <asp:Table runat="server" ID = "tblConversionConnect" BorderColor="Black" BorderStyle="Solid" BorderWidth="1" Width="100%" CellPadding="1" CellSpacing="1"> <asp:TableRow ID="TableRow1" runat="server"> <asp:TableCell ID="TableCell1" runat="server" CssClass="style1"> &nbsp;Source Server:</asp:TableCell> <asp:TableCell ID="TableCell2" runat="server" CssClass="style1"> &nbsp;&nbsp; <asp:TextBox ID="txtSourceServer" runat="server"></asp:TextBox> </asp:TableCell > <asp:TableCell ID="TableCell3" runat="server"> &nbsp;Source Database: </asp:TableCell> <asp:TableCell ID="TableCell4" runat="server" CssClass="style1"> &nbsp;&nbsp; <asp:TextBox ID="txtConversionDatabase" runat="server"></asp:TextBox> </asp:TableCell> </asp:TableRow> <asp:TableRow ID="TableRow2" runat="server"> <asp:TableCell ID="TableCell5" runat="server" CssClass="style1"> &nbsp;User Name: </asp:TableCell> <asp:TableCell ID="TableCell6" runat="server" CssClass="style1"> &nbsp;&nbsp; <asp:TextBox ID="txtConversionUN" runat="server"></asp:TextBox> </asp:TableCell> <asp:TableCell ID="TableCell7" runat="server" CssClass="style1"> &nbsp;Password: </asp:TableCell> <asp:TableCell ID="TableCell8" runat="server" CssClass="style1"> &nbsp;&nbsp; <asp:TextBox ID="txtConversionPass" runat="server"></asp:TextBox> </asp:TableCell> </asp:TableRow> <asp:TableRow ID="TableRow3" runat="server"> <asp:TableCell ID="TableCell9" runat="server" CssClass="style1"> &nbsp; </asp:TableCell> <asp:TableCell ID="TableCell10" runat="server" CssClass="style1"> &nbsp; </asp:TableCell> <asp:TableCell ID="TableCell11" runat="server" CssClass="style1"> &nbsp; </asp:TableCell> <asp:TableCell ID="TableCell12" runat="server" CssClass="style1"> &nbsp; <asp:Button ID="btnConversionConnect" runat="server" onclick="btnConversionConnect_Click" Text="Test Connection" /> </asp:TableCell> </asp:TableRow></asp:Table> </ContentTemplate> </ajaxToolkit:TabPanel> <ajaxToolkit:TabPanel ID="tpConversionReport" runat="server" HeaderText="Data Validation Report" Enabled="true" ScrollBars="Auto" OnDemandMode="Once"> <ContentTemplate> <asp:GridView ID="gvErrorCompilation" runat="server"> </asp:GridView> </ContentTemplate> </ajaxToolkit:TabPanel> </ajaxToolkit:TabContainer>\[/code\]
 
Back
Top