Geeks With Blogs

News

Microsoft MVP


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" C#
How To: Reset Identity Column Value in SQL Table
Recently, one of the members at forums.asp.net is asking if how to reset identity count in sql table. So I thought of sharing the possible solution that we have discussed in this thread as a reference to others. HTH! Technorati Tags: ASP.NET,SQL,C# ......

Posted On Thursday, September 10, 2009 2:17 PM

BASIC: Binding ListBox and DropDownList using LINQ
This example shows the basic way on how to populate a data from database to a ListBox/DropDownList control using LINQ to SQL. Note that I used Northwind database here just for the simplicity of this example. To get started then let’s go ahead and add a new item in your website application in Visual Studio 2008 or VWD Express 2008. To do this, just right click on the web site -> select Add New Item -> and on the Templates select LINQ to SQL Classes as shown below and click ok: Now open up Server ......

Posted On Tuesday, September 1, 2009 6:33 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

Validate Image extensions upon Upload
In my previous two examples, we have learned on how to Upload and Save the Image to a Folder and path to database and how to Save the Image to the Database. The two previous examples only tackle the basics about uploading and saving a file without validating the file to be uploaded. In this example, I’m going to show on how to validate a file that only allows image files to be uploaded using server side validations. Here are the code blocks below: private void StartUpLoad() { if (FileUpload1.HasFile) ......

Posted On Monday, August 3, 2009 3:21 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

How To: Bind Collections to a DropDownList Control
In this example I’m going to show the basic way on how to bind a different collections to a DropDownList control. Note that you can also apply the code mentioned in this example to a ListBox, RadioButtonList and CheckBoxList. I just used DropDownList for this demo because I think it is the most commonly used in the page. To get started, let’s go ahead and grab a DropDownList control from the Visual Studio toolbox and place it in the WebForm. The ASPX mark up should look something like below: <html ......

Posted On Wednesday, July 8, 2009 6:47 PM

Adding Dynamic Editable Rows in ASP Table with Multiple Delete
In my previous example, I wrote a simple demo on how to generate rows of TextBoxes in ASP Table on every click of the Button and retain the previous values on postbacks. In this article, I’m going to extend a bit of what I have shown in my previous example. Basically, I’m going to add multiple delete functionality in the Table by adding some rows of CheckBoxes. Here are the code blocks below: ASPX SOURCE VIEW: <html xmlns="http://www.w3.org/19... <head runat="server"> <title>Dynamic ......

Posted On Wednesday, July 1, 2009 5:05 AM

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