How to create Dynamic table in ms sql? - asp.net

I have a Membership form in asp.net Which contains custom fields.so by that custom Field User can generate more than one field dynamically
for Example (User can add Mobile number column in their membership form (they can add what ever they need)).So i cant able to maintain static table for Membership control in ms sql.
Is there any way to create dynamic table in ms sql for Dynamic Membership form.(whenever user adding column dynamcally i should get those column in ms sql dynamic table)
please help me to solve my problem

Related

Web-based configurable DB using Microsoft products

I'm looking for a method or a platform that I can build on that would allow for the configuration of a dynamic DB from web-based configuration pages rather than having to hard code the DB tables in the back end. I offer an example:
I have an asp.net app with a DB. In that DB I want to put a table that tracks the following attributes:
Field1 = 80 char field
Field2 = date field
Field3 = Text area
Currently I have to manually create a new table directly in my SQL DB with 4 columns: Autonumber ID field, Char field, Date Field, Long Text field.
I would like to have a backend web page in my asp.net app where I could do the following through .Net web pages alone without having to touch the DB directly:
Create a table called TABLE1 with the Char field, the Date field, and the Text field (the ID field would be created automatically)
Add fields to this table at any time through the back end .Net web pages.
Add relationships between fields/tables.
I'd prefer to use a Microsoft product/functionality to allow for this dynamic DB creation and administration as it would allow me to give more power to my users and mean that I wouldn't have to hard code everything directly in the DB. I know this is possible because I can see it being used by large companies like Salesforce.com. Any direction on books, products/platforms or techniques on how this can be accomplished on a smaller scale?

Placing data from sql table to userform and make some field to readonly and allow edit to remaining in asp.net

I am a beginner in asp.net .now I am creating a website in Asp.net .And I would like to place a set of data from sql table to user form. And I want to make some data as read only in user form and user can edit remaining data .then a button click will cause to update the edited data in the same table.
i found many article for querying data from sql and updating the data.my problem is to place the data in the form and make the some data like "employee-id " as read only to user.and allow remaining data to edit.
any idea or solution will be so helpful.

How do we give default value to Primary Key fields in websites created through ASP.NET Dynamic Data (Entities)

I am creating ASP.NET Dynamic Data Site (using entities) to manage master tables of my application.
All my master table has a Primary Key of "UniqueIdentifier" in SQL Server. Where should I write "Guid.NewGuid()" in order to give default value (as new Guid) and to show them in textboxes bound with these fields?
ok, I found the solution myself.
We need to open EDMX file, and ID property in each entity needs to be have StoreGeneratedPattern="Computed"

spreadsheet like asp.net and dynamic view

I want to create an application that users can select fields from database table and create a spreadsheet by those data. Is any control or sample to implement it?
Getting the schema of table varies from database to database.
No matter which database you use, it would be easy to get the list of columns and let the user select which columns to show.
To create a speardsheet you should look at these controls ASP.NET Real World Controls
These custom controls enable you to create excel like grids in asp.net. It is open source allowing you to extend them as may be needed by your project.

Adding custom fields on asp net membership users table

I have a application which I would like to add custom fields to the users table. I am not sure how to work after adding the columns. The columns are foreign keys to another table which holds more details for the user.
I am using Linq-to-SQL. So every time I add a user (using the membership functions i.e. Membership.CreateUser(..)) I end up calling another service to update the foreign keys on the users table.
Any better way of doing this will be highly appreciated.
Why are you adding foreign keys to the User table, pointing to another table with additional info??
I would do it the other way around:
create your own table UserInfo
create a FK column in UserInfo that points to the row in your ASP.NET membership User table
leave the system-provided User table alone - so you won't run into problems when e.g. an upgrade to the ASP.NET membership system is rolled out.....
I strongly recommend you not to extend secure tables such like Users, Membership, Profile. Better create another one table in your database (not secure database) with full info which you need. Call it 'User' with foreign key to 'Id' of table User in secure database.

Resources