WebPartManager wpm = (WebPartManager)WebPartManager.GetCurrentWebPartManager(this.Page); for (int i = 0; i < 5; i++) { TextBox txtTest = new TextBox(); txtTest.ID = "txtTest" + i.ToString(); txtTest.Text = i.ToString()+"_Value";//its value not show on page GenericWebPart gwp = wpm.CreateWebPart(txtTest); wpm.AddWebPart(gwp, Zone1, 1); } Html text <asp:WebPartZone ID="Zone1" runat="server" Width="100%" WebPartVerbRenderMode="TitleBar" HeaderText="Left Zone" BorderWidth="0px" LayoutOrientation="Horizontal" MenuLabelText="MenuLatelText"> <closeverb visible="false" description="" text=""></closeverb> <minimizeverb visible="true" text="" imageurl="~/Images/inner/minus.gif"></minimizeverb> <restoreverb imageurl="~/Images/inner/plus.gif"></restoreverb> <deleteverb visible="false" text="" /> <zonetemplate> </zonetemplate> <TitleBarVerbStyle Font-Size="Smaller" Font-Bold="False"></TitleBarVerbStyle>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)