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

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

dynamically create columns from xml

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :ASP.Net
<?xml version="1.0" encoding="utf-8" ?> <mappings root="sound" child="item" delimiter=",">    <mapping pos="0" name="product" type="Element" />    <mapping pos="1" name="partID" type="Attribute" />    <mapping pos="2" name="numberInStock" type="Element" />    <mapping pos="3" name="numberOnOrder" type="Element" />    <mapping pos="4" name="deliveryDate" type="Element" />    <mapping pos="5" name="supplierStreet" type="Element" />    <mapping pos="6" name="supplierCompany" type="Element" />    <mapping pos="7" name="supplierPhone" type="Element" />    <mapping pos="8" name="orderedBy" type="Element" /></mappings>this is my xml file what i need is a table with 9 columns say item,product....orderedBy

View Complete Post

More Related Resource Links

Dynamically Create Controls in ASP.NET by Using Visual C# .NET

This article demonstrates how to dynamically create a control for an .aspx page. The sample project does the following:
Creates two TextBox controls.
Verifies that the contents (TextBox.text) and the attributes of the TextBox are saved across posts to the server.
Illustrates handling events that are posted by a dynamically-created control

Dynamically Create Controls in ASP.NET with Visual Basic .NET

This step-by-step article describes how to dynamically create controls for an ASPX Web page.

The sample project does the following:
It creates two TextBox controls.
It verifies that the TextBox contents (TextBox.text) and attributes are saved across posts to the server.
It describes how events that are posted by a dynamically created control are handled.

dynamically adding sql server columns based on number of files in fileuploader


I want to create a new table to sql database at runtime.  The column names would be "Name", "Date", "Event".  I would also like to have one more column name "Image" but the problem is that since the amount of images will vary, I want the application to count the amount of files in the Multiple fileuploader and then add a image column to the table for the respected amount of files. 

For example if i am uploading 3 files in the multiple fileuploader, the names should be "Name", "Date", "Event", "Image1", "image2", Image3"

I also would like that table name to be name dynamically from the textbox Name when the user enters the information.


I have the following code to make a new table, but I dont know how to name the fields at runtime like previously asked please help!!!


Dim objConn As New SqlConnection("Server=<servername>;uid=<userid>;pwd=<password>;database=master")


How to create scrolling table for columns in a SharePoint Designer Data View


I have a fairly complex SharePoint Designer 2007 Data View they have added two more requirements.

1. Have the columns on the right side be able to scroll left to right as there is a large number of columns, while the first 3 columns on the left side stay locked in place.  This is only one list not two, and because of some other requirements I have it must remain to be just one list.

2. Then they also need to have scrolling up and down of the entire list with the headers locked in place.

The first requirement is more important than the second, but preferrably I need to do both.

I am new to XSL so not familar with the syntax. Is this something I can do on a custom Data View? Does anyone have any examples of how?

I have a drawing that show how it needs to look but I don't see an option here to upload a graphic.

So here is a link to my graphic example uploaded to my blog area: http://lindachapman.blogspot.com/  or just the image here: http://4.bp.blogspot.com/_aB01ue__NvQ/TGL42MOvrGI/AAAAAAAAAA4/c3xP4uCy4BU/s1600/Scrolling.png

I failed to mention that 3/4 of the columns are HTML Calculated fields wh

How to dynamically create user controls ?



can you explain how to create user control dynamically in a web form ?When i am creating server controls of user controls are not instantiated and it is not getting initialized .when i am tyying to initialize its properties error occurs tha object instance not created .

Any suggestion ? 

How to create Webpart pages dynamically ?


Hello friends,

I need to programatically  create a webpart page on my sharepoint sit on the activation of a feature and after creation of that page, i need to add a webpart. How i will do that? Is it possible create a Webpart page dynamically?


Want to Create Table Dynamically With text Control in WinForm Csharp

Hello To All... from Many Days i m tryng to create a simple table using csharp in WinForm.Which will include textbox in each cell according the Passed No of Col & Row. but not getting the proper result. Actually i want to trace each cell data and want to save each cell data to data base : eg. in cell 11(1col & 1row) i m having Combobox which having some item list and when the user select the list item the data will save to the database. Regards, Praveen    What is the Key of Life ... Its Sharing Your Thought & Knowledge ...

How to create a dynamically populated items in a listbox and use it as a navigation?

Hello, I am trying to create navigation inside a listbox menu. I load data from xml to populate a list. Each item in the list box should be a link or button. Then, I create a frame to load xaml pages in it. I tested to load pages employing button control, outside listbox with on click event and it worked well. However, I cannot make it work with list box items. I am hoping to get help from you. Any sample or ideas are highly appreciated. Below is the code:  XML: <?xml version="1.0" encoding="utf-8"?> <Pages> <page id="page01"> <name>Page 01</name> </page> <page id="page02"> <name>Page 02</name> </page> </Pages> C# to initiate a click o n listbox item and get the path to page: private void SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { ListBoxItem lbi = ((sender as ListBox).SelectedItem as ListBoxItem); string itemName = lbi.Content.ToString(); if ( Nav_ListBox.SelectedItem.Equals("Page01" ) ) { ContentFrame.Source = new Uri("Pages/Page01.xaml", UriKind.RelativeOrAbsolute); } } XAML:  <ListBox x:Name="Nav_ListBox" Margin="0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Background="#FFF2F2F2" ItemTemplate="{DynamicReso

Create Colors for columns in Chart , WPF

Hi, How can i dynamically create colors , which i want to asigned to the Columns in a WPF toolkit Chart control. i want the colors, which are suitable to the chart control (like the ones which are by default generated). thanks Naresh

Unable to create columns in document library after applying custom master page to site

Hi, I have applied a custom master page to a site.There is a document library in it. I am unable to add columns in it or change the default view.Nothing happens when I click on OK butoon after making my changes. However the columns are created/default view is changed when I apply the default master page. Guess I am missing some TagPrefix or sharepoint control on master page.I had solved this problem earlier in this way but don't remeber it now. Can anyone help?

Dynamically Drop and Create tables, overcoming 4000 charachter limit

We have a Navision SQL-server database for 7 companies. Each table starts with the name of the company. Except for the CompanyName-part, the tables names are equal. I made a Foreach loop that dynamically transfers tables/data from the the Navision-database to a staging-database. I also want to Drop and re-Create the tables dynamically. However, if I try to do that via an expression in a SQL Task, SSIS complains about the 4000 character limit. What is a better way to do this? I want to execute SQL-commands and have SSIS replace part of the tablename with the contents of a variable (being the name of one the 7 companies). I have no access to the Management Studio or the DB so I need it to be done within the package. What is the best way to do that?

Dynamically Create a Database (LINQ to SQL)

 Hello... I want to create an install script for a simple little CMS I have created for myself... I want to pass the connection string and then create my tables. I found the following example on MSDN: http://msdn.microsoft.com/en-us/library/bb399420.aspx My question is how do I pass the username and password to the DB... or even better if there is an example of this somewhere that would be great.   Thanks!

What is the best way to dynamically create a scrollable list of forms that when clicked expand for e

Hello, What is the best way to dynamically create a scrollable list of forms that when clicked expand for entry? More details: In my XAML I have a TabControl. One particular TabItem looks like this:   <TabItem Name="Tab_Forms" Header="4" Width="50" Height="20" Background="{x:Null}" BorderBrush="{x:Null}"> <Border Name="Tab_CategoryTabSelected_Border" BorderThickness="10" BorderBrush="Transparent" Padding="3"> <... What do I use here? ...> </Border> </TabItem> At the location <... What do I use here? ...> I need some sort of scrollable control.  The scrollable control can be part of the XAML above. However, the contents of that scrollable control will be entirely code generated. Within that scrollable control will be a vertical list of forms by name with an expansion/contract button next to the name.  When the user clicks the expansion button, the form expands into view, and may be longer than the viewable area, and the user will need to be able to enter data into the entry fields.  I need the tab key to go from field to field as would be expected. If the user is on the last viewable field and there are more fields below, when the user hits the tab key, the for

Dynamically sizing columns while keeping two the same size

I am setting up an interface that has a grid with 5 columns.  Three of those columns have a fixed width.  The other two columns I would like to dynamically size according to how big the grid is (i.e. a * size) and I would like them always equal to each other.  The two pieces of code I have tried follow.  Option A keeps the columns the same size but makes everything as wide as it wants w/ no respect for the size of the grid and Option B allows the two columns to size independently. Option A <Grid Grid.IsSharedSizeScope="True" > <Grid.ColumnDefinitions> <ColumnDefinition Width="14" /> <ColumnDefinition SharedSizeGroup="FirstColumn" Width="200*"/> <ColumnDefinition Width="105"/> <ColumnDefinition SharedSizeGroup="FirstColumn" Width="200*"/> <ColumnDefinition Width="14" /> </Grid.ColumnDefinitions> </Grid> Option B <Grid > <Grid.ColumnDefinitions> <ColumnDefinition Width="14" /> <ColumnDefinition Width="200*"/> <ColumnDefinition Width="105"/> <ColumnDefinition Width="200*"/> <ColumnDefinition Width="14" /> </Grid.ColumnDefinitions> </Grid>

How to dynamically create HTML file from the code ?

Hi all,Precisely and concisely, I have aspx page that has only one button "Generate". If the user clicked on this button, one HTML page should be created. The created HTML page should have title "Home" and the Body should contain "Hello World". 1) What is the code that should be written inside "Generate" button in order to accomplish this functionality? 2) Assuming the HTML page gets created, How to store it inside specific folder on the local drive? Or how to store it inside DB? I would greatly appreciate any constructive input!

Is it possible to dynamically create Name (file name) when item saved to Doc Library?

Even though users have been instructed on a naming convention for saving documents to a library after creating a new one  from the library template, they forget or don't understand.  I would like to have the Name column (which is taken from the file name that it is saved as)  in the Document Library be a concatenation of other document meta data elements.  Is this possible?  In other words, is it possible for me to dynamically save the document with the correct file name as a Workflow action (in a Designer created workflow)?  I tried it, but without success.

Create Report.rdlc in vb.net dynamically


I' m using Microsoft Reporting. Is there a way to create Report .rdlc file Dynamically on the fly? I' m using VB.net.

Any help can be appreciated.




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