Geeks With Blogs

News

Microsoft MVP


DZone MVB


Moderator at CodeASP.NET


Quiz Master







free counters
Free counters
Added on January 19,2012


Follow Me @vmsdurano

A bit About Me



Disclaimer
The opinions expressed herein are my own personal opinions and does not represent the opinions of my employers. Nor does it represent the opinion of my dog, because I don’t have one.


Vinz' Blog (ProudMonkey) "Code, Beer and Music ~ my way of being a programmer" ADO.NET
Dynamically Adding TextBox Control to ASPNET Table: Part 2
Few months ago I wrote an example about Dynamically Adding TextBox Control to ASPNET Table. As a recap that example demonstrate how to generate rows of TextBoxes in a Table control based on the number of rows and number of columns provided and as well as print the values entered by the user using the Request.Forms collections.. Recently,one of the user is asking if how are we going to accomplish the same thing by generating the TextBox in the Table based on the data from the database. So in this ......

Posted On Tuesday, January 25, 2011 5:24 PM

Inserting and Deleting Sub Rows in GridView
A user in the forums (http://forums.asp.net) is asking how to insert sub rows in GridView and also add delete functionality for the inserted sub rows. In this post I'm going to demonstrate how to this in ASP.NET WebForms. The basic idea to achieve this is we just need to insert row data in the DataSource that is being used in GridView since the GridView rows will be generated based on the DataSource data. To make it more clear then let's build up a sample application. To start fire up Visual Studio ......

Posted On Tuesday, January 4, 2011 5:52 PM

Uploading and Importing CSV file to SQL Server in ASP.NET WebForms
Few weeks ago I was working with a small internal project that involves importing CSV file to Sql Server database and thought I'd share the simple implementation that I did on the project. In this post I will demonstrate how to upload and import CSV file to SQL Server database. As some may have already know, importing CSV file to SQL Server is easy and simple but difficulties arise when the CSV file contains, many columns with different data types. Basically, the provider cannot differentiate data ......

Posted On Monday, January 3, 2011 5:03 PM

FAQ: GridView Calculation with JavaScript
In my previous post I wrote a simple demo on how to Calculate Totals in GridView and Display it in the Footer. Basically what it does is it calculates the total amount by typing into the TextBox and display the grand total in the footer of the GridView and basically it was a server side implemenation. Many users in the forums are asking how to do the same thing without postbacks and how to calculate both amount and total amount together. In this post I will demonstrate how to do this using JavaScript. ......

Posted On Wednesday, December 8, 2010 10:29 PM

Building Dynamic Repeater Rows
Few months ago I wrote a series of blog posts about creating a dynamic rows in GridView and Table. In this example I'm going to demonstrate how to build a simple form that allows you to create a dynamic row using the standard ASP Repeater control. To get started, let’s grab a Repeater control from the Visual Studio Toolbox and place it in the WebForm. The mark up should look something like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml... ......

Posted On Wednesday, December 1, 2010 11:33 PM

Move Multiple Rows Between GridViews
This example shows how to move multiple rows between GridViews. The main idea here is to use a CheckBox control for selecting the rows to be removed from one GridView to another and vise versa. Take a look at sample screen shots below: On initial load: Selecting rows from the left GridView: After Moving the selected rows to the right GridView: As you notice the selected rows are automatically sorted by its ID upon moving. Selecting rows from the Right GridView: After Moving the selected rows to the ......

Posted On Thursday, October 8, 2009 11:19 PM

How To: Prevent SQL Injection in ASP.NET
Mike Brind has written a very good example about "Preventing SQL Injection in ASP.NET". If you are new to Data Access manipulations in ASP.NET then I would strongly suggest you to read the article mentioned above. Technorati Tags: ADO.NET,ASP.NET,General ......

Posted On Wednesday, August 26, 2009 7:16 PM

Bind DataTable to DataList Control
This example shows how to bind a DataTable in a DataList control. Just for the simplicity of this demo I’m going to create a dummy data in the DataTable. See the code blocks below: private DataTable GetData() { DataTable dt = new DataTable(); DataRow dr; dt.Columns.Add(new System.Data.DataColumn("Col... typeof(String))); dt.Columns.Add(new System.Data.DataColumn("Col... typeof(String))); dt.Columns.Add(new System.Data.DataColumn("Col... typeof(String))); dr = dt.NewRow(); dr[0] = "Column1 ......

Posted On Thursday, August 13, 2009 10:41 PM

Removing Columns in DataTable
Recently, one of the members in the forum (http://forums.asp.net) is asking if how to remove a particular column in a DataTable if all values in the row of that column are null or empty. So I decided to post the solution that I have provided in that thread as a reference to others who encounter the same problem. Just for the simplicity of this demo, I created a sample DataTable with a dummy data on it just for us to test. Here’s the code block below: private DataTable CreateDataTable() { DataTable ......

Posted On Tuesday, August 11, 2009 8:32 PM

Why DataSet creates TableN as the Default Table name?
Few days ago I have encountered a question in asp.net forums asking if why does the DataSet creates a default name as Table1 well in fact the name doesn’t really exist in the database. So I thought I’d share the answer that I have provided in that thread as a reference to others. As the documentation states that: "Multiple Result Sets: If the DataAdapter encounters multiple result sets, it will create multiple tables in the DataSet. The tables will be given an incremental default name of TableN, ......

Posted On Monday, August 3, 2009 5:15 PM

Uploading and Storing Image Path to Database and Image to Folder - Part 2 (Displaying of Images)
In my previous example, we have learned on how to save the actual image to a folder and image path to the database. In this example, I’m going to show on how to display those images in a GridView and Repeater control. To get started, let’s create a method for fetching the image information from the database. Here’s the code block below: private DataTable GetData() { DataTable dt = new DataTable(); SqlConnection connection = new SqlConnection(GetConnection... try { connection.Open(); string ......

Posted On Sunday, August 2, 2009 5:55 PM

Uploading and Storing Image Path to Database and Image to Folder - Part 1
I decided to write this example because this has been asked many times at the forums. In my previous article I have shown on how to Upload and Save the Images to Database, In this article I will show on how to upload and save the image to folder and path to database. To get started, let’s create a simple database table for storing the Image information and path to the database. I this example I named the table as “ImageInfo” with the following fields below: Note:I set the Id to auto increment so ......

Posted On Sunday, August 2, 2009 4:58 PM

Save Dynamic TextBox Values from GridView to Database
In my previous article, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes. Now, seems that most of the developers are asking if how to save all the data that was entered from the dynamic textbox in the GridView to the database. So in this example, I’m going to show on how to save them all in the database. To get started then lets create a sample Table in SQL Server. In this example, I named the table as “SampleTable” with the following fields below: Note: I set the ......

Posted On Sunday, August 2, 2009 1:54 PM

Sorting GridView Manually with TemplateFields
I decided to write this example because this has been asked many times at the forums. In this article, I will show on how to sort GridView columns manually using a DataTable. Note that in this example, I used my own database for populating the GridView. See Adding Rows in GridView for more info. Now to get started lets set up the GridView with TemplateField columns. Since we are working with TemplateFields then we need to handle sorting manually by adding a LinkButton control inside the HeaderTemplate ......

Posted On Sunday, July 12, 2009 4:58 PM

Adding Rows in GridView with Edit, Update and Delete Functionality
This example is a continuation of my previous post about “Adding Rows in GridView”. In this example I will going to demonstrate on how we are going to do Edit, Update and Delete operations in GridView using TemplateField Columns. If you wan’t to implement those operations using BoundField Columns then you can refer to my previous example about “GridView: Insert, Edit, Update and Delete – the ADO.NET way”. Since this example is a continuation, then I would recommend you to start reading this example ......

Posted On Wednesday, June 10, 2009 2:28 AM

Copyright © Vincent Maverick Durano | Powered by: GeeksWithBlogs.net