Sure... Here is the parent page aspx code... <%@ Page Language="VB" AutoEventWireup="false" CodeFile="PrintPage.aspx.vb" EnableEventValidation="false" Inherits="PrintPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>PrintPage</title> </head> <body> <form id="form1" runat="server"> <asp:Label ID="LblSurveyName" runat="server" Font-Bold="True" ForeColor="#0066FF"></asp:Label> <asp:Label ID="lblSurveySite" runat="server" Font-Bold="True" ForeColor="#0066FF"></asp:Label> <asp:Panel ID="panGeneric" runat="server"> <table style="width: 100%;"> <tr> <td> <asp:Label ID="lblBasic" runat="server"></ asp:Label></td> <td> </td> <td> </td> </tr> <tr> <td> <asp:Label ID="lblWaterData" runat="server"></asp:Label></td> <td> </td> <td> </td> </tr> <tr> <td> <asp:Label ID="lblB_N" runat="server"></ asp:Label></td> <td> </td> <td> </td> </tr> </table> </asp:Panel> </form> </body> </html> Here is the survery.aspx page(or the relevant part of it): <%@ Page Language="VB" MasterPageFile="~/SurveyMasterPage.master" AutoEventWireup="false" CodeFile="WaterbodyAdd.aspx.vb" Inherits="WaterbodyAdd" title="WaterbodyAdd" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table style="width:100%;"> <tr> <td style="width: 266px" colspan="2"><asp:Label ID="lblTitle" runat="server" Text="Add BMP Waterbodies"></asp:Label></ td> <td style="width: 414px"><asp:Label ID="lblMSG" runat="server" Font-Bold="True" Font-Italic="True" ForeColor="#CC0066"></asp:Label></td> <td><asp:Label ID="lblSurveyName" runat="server" ForeColor="Blue"></asp:Label></td> </tr> <tr> <td style="width: 266px" colspan="2"><asp:Label ID="lblWaterName" runat="server" Text="Waterbody Name "></asp:Label></ td> <td style="width: 414px"><asp:TextBox ID="txtWaterbody" runat="server" Width="396px"></asp:TextBox></td> <td><asp:CheckBox ID="cbNoName" runat="server" Text="Check if Name is Unknown" /></td> </tr> <tr> <td style="width: 133px"><asp:Button ID="btnNext" runat="server" Text="Next Page" Width="129px" /></td> <td style="width: 266px"><asp:Button ID="btnAdd" runat="server" Text="Add Waterbody" Width="232px" /> </td> <td style="width: 414px"> </td> <td> </td> </tr> </table> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="footer" Runat="Server"> <asp:GridView ID="gvWaterbody" runat="server" Width="406px" DataKeyNames="watername" AutoGenerateDeleteButton="true" AutoGenerateColumns="False" CellPadding="5" Font- Names="Helvetica,Tahoma,Arial,sans-serif" Font-Bold="True" Font-Size="X-Small" RowStyle- ForeColor="#0066ff" EmptyDataText="There are no data records to display."> <Columns> <asp:HyperLinkField DataTextField="watername" HeaderText="Waterbody Name" DataNavigateUrlFields="watername" DataNavigateUrlFormatString="WaterbodyUpd.aspx?watername={0}" ItemStyle-Font-Underline="true" ItemStyle-ForeColor="DarkBlue"> <ControlStyle Font-Underline="True" ForeColor="#0066FF" /> <ItemStyle Font-Underline="True" ForeColor="#0066FF"></ ItemStyle></asp:HyperLinkField> <asp:BoundField DataField="survey_fk" Visible="False" /> </Columns> </asp:GridView> </asp:Content> Here it the code behind of the parent which calls the survey.aspx page(I have trimmed down the code so it is less confusuing) Response.Clear() Response.Buffer = True Response.AddHeader("Content-Disposition", "attachment; filename=BMP.htm") Response.ContentType = "text/html" Response.Charset = "" Me.EnableViewState = False Dim SB3 As StringBuilder = New StringBuilder SB3.Length = 0 Dim SW3 As StringWriter = New StringWriter(SB3) Dim htmlTW As Html32TextWriter = New Html32TextWriter(SW3) htmlTW.WriteBreak() HttpContext.Current.Server.Execute("SurveyAdd.aspx") Dim pnlSurveyGeneral As Panel Dim pnlSurveyForest As Panel Dim pnlCompilance As Panel Dim pnlSurveyAdd As Panel = Session("SurveyAddPanel") If SurveyType <> "NON SILVICULTURE" Then pnlSurveyGeneral = Session("SurveyGeneralPanel") pnlSurveyForest = Session("SurveyForestOperationsPanel") pnlCompilance = Session("OverallCompliancePanel") End If Response.Clear() htmlTW.WriteBreak() Dim htm As String = htmlTW.ToString pnlSurveyAdd.RenderControl(htmlTW) Dim strSW3 As String = SW3.ToString If SurveyType <> "NON SILVICULTURE" Then pnlSurveyGeneral.RenderControl(htmlTW) strSW3 = SW3.ToString pnlCompilance.RenderControl(htmlTW) Else Me.lblB_N.Text = SW3.ToString Response.Clear() Response.Write(SW3.ToString) Response.End() Exit Sub End If ' loop thru the waterbodies Me.lblBasic.Text = SW3.ToString Dim SB4 As New StringBuilder SB4.Length = 0 Dim SW4 As StringWriter = New StringWriter(SB4) Dim htmlTW4 As Html32TextWriter = New Html32TextWriter(SW4) ' capture values from panel session variables for pages B-N Dim dtPartIV As DataTable dtPartIV = oBMP.GetSummaryChecked(Session("SurveyPK")) If dtPartIV.Rows.Count > 0 Then Dim strB As String = dtPartIV.Rows(0).Item("sum_wetlands").ToString If strB = "Y" Then HttpContext.Current.Server.Execute("Survey_Part4B.ASPX") Dim pnlPart4B As Panel = Session("Part4Bpanel") pnlPart4B.RenderControl(htmlTW4) End If end if On Mar 30, 3:25 am, sim arora <[email protected]> wrote: > can u post the code please? > > > > > > On Tue, Mar 29, 2011 at 7:27 PM, crocboy25 <[email protected]> wrote: > > Hello Group, > > > I am using 3.5 .NET VB. In a code behind I am calling a page using > > this approach: > > HttpContext.Current.Server.Execute("Survey.aspx"). > > > On the survey.aspx page I have several textboxes are varying sizes. > > If I run the survey.aspx page alone, the textbox appear on the screen > > in the correct size settings. However, when I use the > > HttpContext.Current.Server.Execute method to execute the survery.aspx > > page from another page, the textboxes always come back a fixed width > > of like 200px or so. It doesnt matter what I change the size of the > > width to in the survey.aspx page, they are always rendered the same > > size for every textbox on the page. The changes do show up if I view > > the survey.aspx page alone though without calling it through another > > page so I know my syntax for changing the width settings is correct. > > > Does anyone have any idea what causes this and how to resolve it? I > > am stumped. > > > Thank you for any help > > > Lee > > > -- > > You received this message because you are subscribed to the Google > > Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML > > Web Services,.NET Remoting" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en > > or visit the group website athttp://megasolutions.net > > -- > > With Regards, > Samridhi Bhutani > 9711369855- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en or visit the group website at http://megasolutions.net
