C# - Save Data As Xml In DB Versus Saving Multiple Rows Of Data?

Dec 4, 2010

I am designing my database and wanted to know the best way to handle this problem. I have tabs on a page that looks like this:

Tab1
--SubTab1
----Data1
--SubTab1
--SubTab1
Tab2
--SubTab1
--SubTab1
--SubTab1
Tab3
--SubTab1
--SubTab1
--SubTab1

I can put this information in the database that will be stored in multiple rows like this

TypeID---------------Name
1--------------------Tab
2--------------------Data

ObjectID----------Parent-------------TypeID
1-----------------0------------------1
2-----------------0------------------1
3-----------------0------------------1
4-----------------1------------------1

Or I can just put this in the database like so:

<root>
<tab name="MyTab">
<tab name="MySubTab">
<data>1234567890</data>
</tab>
</tab>
</root>

If I pull just the xml from the database then I would not need to select multiple rows i just need to select one row then parse the xml into a class then pass that data to the controller. I just would like to know if this is a good idea? Will I be making a mistake if my site to scale in the future? Will this make more maintenance as the site gets bigger and want more features?

View 5 Replies


Similar Messages:

Forms Data Controls :: How To Save And Retrieve Multiple Gridview Rows

May 13, 2010

I want to be able to select rows and save them for later display. I wish to store the data in a session object for viewing before i decide to save permanent in database.

View 4 Replies

Data Design - Multiple Short Trips Versus One Big Trip?

Jul 20, 2010

Is it better to have the calculated field returned with the rest of the results or is it better to calculate it later when you need it?

Example: I have a GridView that displays search results that has many fields like:

Application ID
Name
Account Type
Account Number
etc.

The account number field is not always consistently the same thing though. For accounts of type A they are eight digits long and for accounts of type B they are twelve.

After the search if they select a record and choose to continue the application I need to check the eigit digit account number for any access restrictions. All accounts of type A and B have an associated eigit digit account number, it is just that type B are the only ones to have the twelve digit number.

So should I add a redundant hidden field like "Common Account Number" to the search results and just hide it, thus making the heavily used search take slightly longer and making the results grid take up more space in the view state?

Or

Should I call the database when they try to continue the application and translate the Application ID into the eigit digit number so that I can use it to do my access restriction check? This will require one extra call to the database but the translation should be fast as both fields are in the same table and the application ID is a primary key. The continue application button will be used less as there are many other command options.

View 2 Replies

Forms Data Controls :: Bind Gridview With Data Table And Save Rows?

Jan 5, 2011

I want to bind gridview with datatable in this dt ihave 4 columns , dt

Id Name isdelete value
1 xyz true
2 uio false
3 bbb true
4 ccc false

this is gridview

[Code]....

but i want not bind those rows whose isdelete coumn value is false and i want to show 4 th column as textbox and user will enter some text or number and if he click save button outside of gridview one record shld save in database

View 2 Replies

Forms Data Controls :: Gridview Save Existing Data When Adding Rows Via Arraylist?

Jan 19, 2010

I have a gridview that contains template fields with textboxes that is used to look up inventory items. The page loads using an arraylist to display a gridview control with a predetermined number of rows. There is also drop down control that allows the user to add additional rows to the gridview if needed.

Currently when a user has already entered some data if you use the drop down to add more empty rows all the original entrys are removed. I want to save the original data and then add empty rows at the end.

>>

Private Sub LoadDataGrid(ByVal numberOfRows As Integer)
Dim Counter As Integer
Dim GridList As New ArrayList
For Counter = 0 To numberOfRows
GridList.Add(New LibVB.Form2VB(Counter))
Next
gvEnterParts.DataSource = GridList
gvEnterParts.DataBind()
End Sub
<<

I'm lost, kind of a newbie to .net, have been working on this for 2 days! d.

View 5 Replies

Web Forms :: Save Multiple Rows To Database Using SqlBulkCopy

Oct 21, 2015

I am new in asp.net..My Problem is  i have 3 textboxes..

in first text box i enter A1,

Second Textbox i enter 3,

Third Textbox i enter 5

after button click i want to store

A1B1,A1B2,A1B3 as per second textbox i enter 3

A1C1,A1C2,A1C3,A1C4,A1C5 as per Third Textbox i enter 5

how to generate the above rows and how to save in database

View 1 Replies

DataSource Controls :: How To Save Multiple Rows Using ADO.NET Entity Framework

Mar 23, 2010

public void saveOptionalCourses( ArrayList coursesAdded, int studentID)
{
StudentOptionalCoursesXRef XRefObject = new StudentOptionalCoursesXRef();
using (var EntityObject = new SchoolProjectEntities2())
{
foreach ( string list in coursesAdded)
{
XRefObject.StudentDetails = EntityObject.StudentDetails.Where(c => c.StudentID == studentID).First();
XRefObject.OptionalCourses = EntityObject.OptionalCourses.Where(c => c.OptionalCourseName == list).FirstOrDefault();
EntityObject.AddToStudentOptionalCoursesXRef(XRefObject);
}
EntityObject.SaveChanges();
}

with this above method and could save only last row that am returning remaining rows are iterated but are not saving on to database

View 2 Replies

Saving Multiple Sets Of Data In A Form?

Jun 11, 2010

I have a form where the user enters their first name, last name, email address etc.. and then they also have the ability to enter 'cottages' that they are interested in viewing (ie. The cottage name, cottage address). The user then needs to be able to 'save' this somewhere and enter another cottage into the same form.

Finally the user will submit the form, and all the user details, and cottage details will be emailed to admin.

View 2 Replies

Forms Data Controls :: Which Is Better To Display Multiple Rows Of Data With Multiple Controls DataGrid Or DataRepeater

Nov 19, 2010

I have a page in which i need to show data in the form of a grid. Each row in the grid is made up of 2 sub-rows, the first sub-row consists of a dropdown, a textbox & a textarea. Whatever is entered in these controls should be displayed in the second sub-row in the form of labels at runtime (i.e. using javascripts)

There can be multiple rows like this. The grid would have a max of 30 row, not more than that. create this which one would be better, in terms of performance & complexity, a GridView or a DataRepeater?

View 2 Replies

Forms Data Controls :: Saving Multiple Checkboxes In Gridview

Jul 8, 2010

save the Mulitple checkboxes in Gridview in once. I want to save only those rows which are checked.. not the once which are not checked. There is a row in gridview which has four checkboxes in each row, so i want to save the row in which either or all of the checkboxes are checked and ignore the once in which anyof checkbox is not checked.

View 4 Replies

Data Controls :: How To Save Selected Rows Of GridView

Sep 10, 2013

How can i save selected rows of a gridview (appearing inside javascript pop up page) into another gridiew (appearing inside "other" java script pop up page) on SAVE button click??

View 1 Replies

Data Controls :: Pass Multiple GridView Row Data To Web Method / Save To Database Using JQuery AJAX

May 7, 2015

I want to add  gridview row data into to data base I am doing it perfectly.My problem is that want all gridview row data save and then web method should be called but in my cause one  gridview  data save in array then call webmethod,then other row data save in array then call webmethod called this process should be so on.But I want it webmethod should be called when all gridview row save in array.

Follwing code

Jquery
<script type="text/javascript">
$(function () {
$("[id*=btnSubmit]").bind("click", function () {
var Customer = {};

[code]....

View 1 Replies

Data Controls :: How To Save GridView Deleted Rows To Separate Table

Nov 11, 2013

I have made a call logging application in which i have authorised a normal user to edit update and delete from the gridview.But i want to give the admin person rights to see all the complaints deleted updated edited..i have thought a lot but all in vain havent found.

View 1 Replies

Data Controls :: Save Checked Rows From GridView Control To Database?

Oct 17, 2012

I have check box field in grid view and I want to save checked row in sql server 2005.how i can save.

View 1 Replies

Forms Data Controls :: How To Save / Delete A Record Based On Button's In Gridview Rows

Feb 3, 2011

Type: 28978 into this site: [URL]

Students have to chose a subject in a row. This will be updated in the table above.

I use this Stored procedure:

[Code]....

I would like my button to Insert/Delete records in the table. How can a button in a GridView row choose parametres form the right row?

My code...

[Code]....

View 9 Replies

Forms Data Controls :: How To Save Viewstate Of Gridview After Cols / Rows Modified In PreRender

Oct 29, 2010

I have changed the look and feel of the grid by modifying the cols, rows in the gridview. I need to save this in the gridview viewsate, so that it load the modified look and feel next time it loads from the viewsate.

View 3 Replies

Data Controls :: Enable Disable Save Button While Ordering GridView Rows Using JQuery

Feb 25, 2016

I came across the below article, I would like to know how to properly respond to the drop or stop event so that I can show the Save button only once someone changed the order. In other words, I would like the Save button hidden initially, only to make it visible once a drag and drop has occurred.

[URL]....

View 1 Replies

Should A Datalist Or Gridview Be Used For Multiple Rows With The Data As Shown

Nov 15, 2010

Sql select statement returns: customer_name, month, and count. There is one row per month as follows:

name-1, 01, count1

name-1, 02, count2

name-1, 03, count3

name-2, 01, count4

etc

I want to be able to display as follows:

Customer----Jan-------Feb-------Mar

Name-1______count1____count2____count3

Name-2______count4

etc.

There will be some customer that don't have a month record. The display can show all 12 months.

My questions are: 1) Is datalist or gridview the best? 2) Where can I find examples of how to do this? 3) Also, an example of "no data" for a month. I'm a beginner, have been trying to research, but can't seem to get headed in the right direction.

View 2 Replies

Forms Data Controls :: Inserting Multiple Rows Into Sql?

Mar 9, 2011

I am currently trying to create a web from that takes multiple lines and inserts them in to multiple rows in sql. So basically On the Web form It will have the following info

Store No = "28" Activity = "Bake Cake" Date = "3/3/11"
Store No = "28" Activity = "Eat Cake" Date = "3/6/11"
Store No = "28" Activity = "Sell Lemonade" Date = "2/3/11"
Store No = "28" Activity = "Bake Fudge" Date = "3/30/11"
Store No = "28" Activity = "Eat Cookies" Date = "5/3/11"

Currently I am using this script to insert values into SQL:

[Code]....

View 4 Replies

Data Controls :: Get Multiple Selected Rows From DataTable In C#

Jun 16, 2015

I want to Get multiple selected column from datatable using c#. Below I have added data of datatable and I want red marked rows from datatable. Green marked text is column name of datatable.

Parameter Value
GetTempFilenameResult 0
tempFilename 0
data 0
fid 0
useid 0
filename 0
tempFilename 0
userName 1
pwd 1
LoginResult 1
useid 2
usename 2
address 2
mobileno 2
emailid 2
organization 2
city 2
country 2
password 2

View 1 Replies

Data Controls :: Search GridView On TextBox KeyPress And Save (Insert) Filtered Rows To Database Using JQuery AJAX

May 7, 2015

I have used Jquery Qucik serach Plugin and Its working fine for me. But I want to get the each record after filter when click on save button.

let's say gridview has total records are 4 then filtered records are 2.When click on Save button 4 records are getting.

View 1 Replies

Forms Data Controls :: How To Return Multiple Rows From A Query

May 18, 2010

I have the below c# method to populate an asp.net frontend control from a linq query. The only valid way I seem to be able to reference the query variable "result" is if I use the attribute "SingleOrDefault" but unfortunately this forces my query to return just the one single set of data for every unique primary key UserId value from my query, where I require the unique data attached to each different UserId value to be returned, how can I achieve this using linq? Note, I am passing the UserId value into my method from a public variable which is also below.

[Code]....

View 4 Replies

Forms Data Controls :: Listview: Add Multiple New Rows To The Same Page?

Jul 30, 2010

I am trying to have a listview which will work like a table with paging. My problem is I need to be able to add more than 1 row at a time. ie I want to click "add new row" multiple times on the same page without the page changing and without the rows I'm adding going away.

Basically I need the user to still see the already inserted rows as well as the rows they are planning to insert on the same page. This would mean the page size is temporarily larger than it should be. The new rows would be added to the end of my data source when the user goes to another page or clicks a separate save button. However the user can add as many new rows while on a page as they wish and the page would simply grow.

View 2 Replies

Forms Data Controls :: Edit Multiple Rows In A Grid?

Oct 7, 2010

I have a gridview on a web form and it is working, but the users find it too slow for data entry with them having to click on the edit and update buttons. I would like to allow them to edit all the rows and then when the form's overall save button is pressed then I save the changes. I found this: [URL] which does something similar, but I don't want to use the check box to indicate which row is being edited.

I've got close based on that code, but one of the controls in the column needs to control how the rest of the columns are displayed and I can't work out how to refer to the other columns and control on the current row from some code that is called by the OnTextChanged associated with a control.

View 3 Replies

Forms Data Controls :: Delete Multiple Rows In Grid?

Jun 16, 2010

ihave grid in which i want to delete selected rows (checkbox selected)

i have written code as follow but on click on delete button it delete all.

[Code]....

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved