.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Creating asp.net page dynamically

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :ASP.Net
Hi All:  I have a requirement that I need to create asp.net page dynamically for each folder inside a specific folder. I know the code to traverse each folder but I don't know how to create a new page dynamically and show the contents. Please help me on this.   Regards,  Asif HameedHi All: I have a requirement that I need to create asp.net page dynamically for each folder inside a specific folder. I know the code to traverse each folder but I don't know how to create a new page dynamically and show the contents. Please help me on this.  Regards, Asif Hameed

View Complete Post

More Related Resource Links

creating different sub page design template in sharepoint website


I know very little about sharepoint and have outsourced the design of a master page and sub page design for a new website using sharepoint. i received a site master file with all of the necessary images and the home page works just fine. However the file i received for the sub page design template was an ASPX file with the following instructions:


Here I enclosed the inner page layout file. You upload this file by using following instructions. you can change & edit the blue menu section in the master page itself. If I change into modifiable section you need to add the menu in each and every page, otherwise it will show as empty block. Please let me know your comments.


Steps for uploading inner page layout page.


1.Select the Site Actions button and click on Site Settings->Modify All site settings

Dynamically creating Gridview Template - Linkbutton Click not working



I have written some code to dynamically generate template columns for gridview which works well. However, each cell in the gridview has to be a linkbutton, which when clicked does a db update and redirects to a specific url with some parameters in it.

I have attached a click event handler to the linkbutton in the InstantiateIn method but the event does not seem to fire.

Could someone please help? the code is below -

//Dynamically creating the Grid

protected void btnAnalyze_Click(object sender, EventArgs e)

dynamically add record in page


I am creating page dynamically using this. I want to read the file, which is dynamically created and show content on page from database like 40 record in each page.

String root = Server.MapPath("~");
        String pgTemplate = root + "\\myPageTemplate.tmp";
        StringBuilder line = new StringBuilder();        
        using (StreamReader rwOpenTemplate = new StreamReader(pgTemplate))
            while (!rwOpenTemplate.EndOfStream)

        int ID = 0;
        string SaveFilePath = "";
        string SaveFileName = "";
        Random ran = new Ran

Dynamically change the page footer height

Hi, I want to dynamically change the page footer height based on a condition? Is that possible?   Thanks in Advance  

Help with creating graphs in a site page from figurative data in custom list

Guys Can anyone provide me with someone help please? I need to be able show a graphs/line format in a web part of a site page on my SP 2010 site. I want to use some changing figurative data that is contained within a custom list change a the line/pie chart graph on the fly that is located within a chart/line graph in a site page. Basically when the data in the custom list gets changed by my resources I want to be able to see the changes in the graph almost like a live dashboard. I would be very greatful for some help. Note: I am not a coder nore do I ever claim to be, but if I could get a step by step guide on how to achieve this then I would be very greatful. I have a good understanding of SP but I am not to the coder. I able to supply the list if necessary and if someone could provide me with the code/or if code is not necessary for this task then please can you advise how? Many Thanks Mike Gowlett PMP P2P (MCSE, MSP, Old School :-) 

Creating collapsible panel dynamically in datalist

Hey guys,Here is what I have done so far. I have a datalist to show notifications. The datalist is bound to an sqldatasource. I have tried to use a collapsible panel extender in the datalist to hide or show message, but the designer could not render the datalist because of the collapsible panel control. It gives an error "Unknown server tag asp:CollapsiblePanelExtender"here is my code<asp:DataList ID="DataList4" runat="server" Width="625px" DataSourceID="SqlDataSource1" OnItemDataBound="FormatInput"> <HeaderTemplate> <asp:Label ID="Label3" runat="server" Font-Names="Castellar" Font-Size="Large" Text="Notifications"></asp:Label> </HeaderTemplate> <ItemTemplate> <table style="width: 605px"> <tr> <td style="width: 453px"> <asp:Label ID="lbl_Username" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>  <asp:Label ID="lbl_NoteType" runat="server" Text='Label'></asp:Label> : <asp:LinkButton ID="lbtn_V

Urgent- How to show sequential workflow on asp.net web page dynamically

Hi All,My basic question is how can we show a sequential workflow diagram on asp.net web page dynamically. using WWF can we do this?. i have gone throgh the some of forums/articles but i could not find right information anywhere. please suggest me the right path to achieve this.

Rearrange dynamically visible controls on a page

Hello,Here is what I am trying to do.I have a drop down list along with a 'Add' button (which are always visible). There are some other 'Label', 'TextBox', 'Button' in the page (which is not visible on load). Depending on the user selection from the first dropdown (and when click on 'Add' button), I would like to dynamically set some of the Controls visible.For example (as per below code): When User selects 'Email' ... Label3, TextBox3 and Button3 will be visible. Again when user will click Button3, all controls will be invisible. I was able to Show and Hide those controls as per user selection and button click. What I would like to do is, rearrange the controls. For example, If user selects 'Email' and click 'Add' button (Button5), It would display 'Label3', 'TextBox3', 'Button3'. Then if user selects 'Name' from the dropdown and click 'Add' button again, it would display 'Label1', 'TextBox1', 'Button1' below the Email controls. As of now it is apperaing on sequence as listed in html (Name controls always come first when visible, then 'Phone', then 'Email'). I would like to display the controls as sequesnce as user selects.And next is when we will click the Button3 (which will hide the email controls), All other controls below email co

How to set the heading of aspx page dynamically?

Hi,I would like to set the page heading according to the querystring value.So, it is something like this:From Page1.aspx I am redirecting to Page2.aspx.In Page1, I have list of image buttons depicting different Departments coming from database.On clicking the particular Image button I will be redirected to Page2.aspx which shows info regarding to that department.Page1.aspx code:<asp:ImageButton ID="imgbtnProject" runat="server" PostBackUrl='<%#GetUrl(DataBinder.Eval(Container.DataItem,"DeptId")) %>' ImageUrl='<%#String.Format("{0}{1}","images/Depts/",Eval("ImagePath"))%>'/>Page1.aspx.cs, GetUrl() method:protected string GetUrl(object ProjectId) { return string.Format("~/Page2.aspx?DeptId={0}", DeptId); }Now, I want to reset the page heading of Page2.aspx,depending on the Department,so, it should be:MyProject-Accounts,MyProject-Marketing etc.It is having master pages as well.Please suggest me how to do that.

Creating Login Page Problem

I doing a login page using visual c# and encounter some problem on it. my database got Username, Password, and UserType I want to create a login page redirect the user to different page based on their roles. It show that there is an error on the code (line 24). Any idea on create a login page that redirect the user to different page based on their roles?It shows this message :   this type or namespace name 'DataView' could not be found(are you missing a using directive or an assembly reference)Here the code, protected void Page_Load(object sender, EventArgs e) { string connectionString = "Data Source =.\\SQLEXPRESS;" + "AttachDbFilename=\"C:\\Program Files\\Microsoft SQL Server\\MSSQL10.SQLEXPRESS\\MSSQL\\DATA\\UserDB.mdf\";" + "Integrated Security=True;" + "Connect Timeout=30;" + "User Instance=True;"; System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(connectionString ); System.Data.SqlClient.SqlCommand cmd = conn.CreateCommand(); conn.Open(); } protected void Button1_Click(object sender, EventArgs e) { SqlDataSource sds = new SqlDataSource(); sds.SelectParameters.Add("Username", TypeCode.String, this.TextBox1.Text); sds.

Creating Page Layout Sharepoint 2010 Publishing

I am trying to create a custom Page layout (3 fixed columns with webzones 1 for content (content editor) and other 2 for adding web parts here is my aspx, please some one help me out, as tha webpart slides below another if it exceeds the width <%@ Page language="C#" Inherits="Microsoft.SharePoint.Publishing.PublishingLayoutPage,Microsoft.SharePoint.Publishing,Version=,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full" %> <%@ Register Tagprefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly=&qu

Creating custom property on derived Page

I am attempting to accomplish the following during the creation of a Page derived from DerivedPage: <local:DerivedPage xmlns="..." xmlns:x="..." xmlns:local="..." MyProperty="My Value" Title="My Title"> ... </local:DerivedPage> You'll notice an extra property MyProperty in there. The code-behind is like this: class DerivedPage : Page { public string MyProperty { get; set; } ... } When I execute this, I get a null reference in InitializeComponent() when I create a Page derived from DerivedPage. I also tried making MyProperty a dependency property.  But I get the same results. How can I create a property for my new base-class that's set in the markup of my derived class. Thanks, ...Matt

Creating Multipage tiff from single page tiffs



I have big list of single page tiffs. How .net Graphics library can be used to create multipage tiff out of all my single page tiffs. Because I have huge number of tiffs, I want to do it more efficiently.




Bibek Dawadi

The page cannot be displayed error when creating new item in custom list


Hi i am workign with a cutom list and every time i try to add a new item and hit ok i get the error shown below. Sometimes it happens and other times it doesnt and it only happens with a select few. One way of getting around this error is to not edit it on the page on which it is on but to go to view all content then to the custom list.

I have tried observing whether there was an issue with the pages being checked in and checked out but all pages were checked in and published. I tried deleting and recreating the custom list and no luck. Your feedback would be much appreciated! Thanks in advanced

btw i am a user with full control and our site is being hosted.

The page cannot be displayed


Dynamically added text boxes disappears after page refresh


Dim objDatabase As New database
        Dim objAdapter As SqlDataAdapter
        Dim objDataset As New DataSet
        Dim objAdapter1 As SqlDataAdapter
        Dim objDataset1 As New DataSet
        Dim objAdapter2 As SqlDataAdapter
        Dim objDataset2 As New DataSet

        objAdapter = New SqlDataAdapter("SELECT first_name + ' ' + last_name as [Name],father_mobile_no as [Father Mob No],mother_mobile_no as [Mother Mob No] FROM student_data WHERE class='" & cmb_class.SelectedValue & "' and division = '" & cmb_division.SelectedValue & "' and school_id='" & Session("school_id") & "'", objDatabase.con)
        objAdapter.Fill(objDataset, 0)
        If objDataset.Tables(0).Rows.Count > 0 Then

            Dim dt_table As DataTable

Tutorials on creating a "News & Comments" page please...


I'm not "new" to .Net, but it's been a long time since I've done any "real" programming and need some refresshers and/or tutorials. Specifically, I need to know what can & can't be done with the current Ajax/VB.Net controls. Here's what I am trying to do:

I need  a daily "news" space for my client to write a blog-like post on her website, and on the same page, a place for her readers to post comments. I also need to count how many comments are made and dsiplay them in the header (exactly as shown here at the bottom where comments can be added: http://www.asp.net/general/videos/lesson-8-working-with-the-gridview-and-formview)

Are there any plug-ins to allow me to easily create this type of a page with the comments table already set up? No reason to re-invent the wheel if this has already been done and there is an add-in for this. Any suggestions, tutorials, links, would be greatly appreciated. I am using VS 2010 with VB.Net, HTML & CSS.


How to create a Table of content in .rdl design in BIDS dynamically according to the Page no wise..?



well i am able to create the TOC statically by using the Document Map properties as describe in my older post issue 

but now i just want to create the Table of contents dynamically generate using the page no wise..is it possible...how can we do it while designing the .rdl in BIDS..



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend