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" SQL There are 28 entries for the tag SQL
A Monkey Talks about ASP.NET
Last week, I was interviewed by Zandra Nilocas from Microsoft Philippines. It was my first time experience to talk about something in front of the camera so it's not surprising that I looked like an idiot in that interview (you know swiveling my chair back and forth without noticing it). Anyway in the interview we talked about ASP.NET WebForms, MVC and Web Matrix in general and just to elaborate a bit of what we talked about and to clarify things out, I have decided to write this post... WebForms ......

Posted On Thursday, April 14, 2011 2:50 PM

Entity Framework - Editing, Updating and Deleting Data in the Form
Previously we've talked about how to fetch the data from the database and populate the form with EF. In this example I'm going to demonstrate how to do Edit,Update and Delete operations in the form with Entity Framework. And oh since this is a continuation of my previous example I would suggest you to refer that first before you go any further. STEP 1: Setting up the UI Since this is a continuation of my previous example then I'm jus going to use the same layout and extend it a bit by adding some ......

Posted On Monday, April 4, 2011 8:00 PM

Entity Framework - Fetching and Populating the Data in the Form
In Part 1 we've talked about how to insert data to the database with Entity Framework. In this part I'm going to demonstrate how to fetch the data from the database and populate the form fields with Entity Framework. STEP 1: Setting up the Form To get started let's go ahead and fire-up visual studio and add a new WebForm. For the simplicity of this demo I just set up the form like this: <asp:Content ID="Content2" ContentPlaceHolderID="MainC... runat="server"> <asp:DropDownList ID="ddlUser" ......

Posted On Monday, April 4, 2011 7:41 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

Introducing WebMatrix Beta
Microsoft has recently released the first beta version of WebMatrix. What is it? Taken from the WebMatrix official site: "WebMatrix is everything you need to build Web sites using Windows. It includes IIS Developer Express (a development Web server), ASP.NET (a Web framework), and SQL Server Compact (an embedded database). It streamlines Web site development and makes it easy to start Web sites from popular open-source apps. The skills and code you develop with WebMatrix transition seamlessly to ......

Posted On Wednesday, July 7, 2010 6:08 PM

Editing, Updating and Deleting Data in the Form using LINQ to SQL
In my previous example we talked about how to fetch data from database and how to populate the form with data using L2S. In this example I’m going to extend a little bit of what I have demonstrated in my previous example. Basically I’m going to show you the basic way on how to edit and delete data from the form and update the database using L2S technology. Since this is a continuation of my previous example so I would suggest you to refer that first before you go any further. STEP 1: Setting up the ......

Posted On Wednesday, May 5, 2010 4:52 PM

Fetching Data from Database and Populating fields in the Form using LINQ to SQL
In my previous example I have demonstrated how to create a simple form that would allow users to insert data to the database using L2S. In this example I’m going to demonstrate how to fetch and filter data from database and fill the fields in the form using L2S. This example is basically a continuation of my previous example here. So I would suggest you to take a look at my previous example first before you proceed reading this example. STEP 1: Setting up the GUI To get started, add a new WebForm ......

Posted On Thursday, March 11, 2010 3:26 PM

Inserting Data to Database using LINQ to SQL
Few months ago, I’ve created a simple demo about “Creating a Simple Registration Form using the ADO.NET way”. In this article, I'm going to demonstrate how to create a simple form that would allows users to insert data to the database using L2S. As an overview, LINQ to SQL is a technology that allow you to query sql server. LINQ to SQL is an O/RM (object relational mapping) implementation that ships in the .NET Framework "Orcas" release, and which allows you to model a relational database using .NET ......

Posted On Thursday, March 11, 2010 3:12 PM

Pluralsight On-Demand Training library
Technorati Tags: General Pluralsight is an online .NET Training library which provides online training materials for .NET developers. Example trainings available on demand: · .NET 3.5 · Agile Team Practices · ASP.NET 3.5 · ASP.NET AJAX · ASP.NET MVC · BizTalk 2006 · BizTalk Server 2006 R2 · BizTalk Server 2009 · iPhone ASP.NET · LINQ · Managed Services Engine · Silverlight 3 · SharePoint Services · SQL Server 2008 · VSTS · WCF · Windows Server AppFabric, formerly "Dublin" · Windows Workflow · WPF ......

Posted On Friday, February 26, 2010 5:39 PM

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

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

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 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

Save CheckBoxList Selected Items and Retain them on PostBacks.
I decided to write this example because I always encounter this kind of issues at http://forums.asp.net . This demo basically shows how to save the CheckBoxList selected items in the database and retain its selected items on postbacks or when the page is loaded again. To get started then lets start by creating the database for storing the data. STEP 1: Creating the database. Launch Sql Server Management Studion Express and then connect Expand the Databases folder from the Sql Server object explorer ......

Posted On Wednesday, May 6, 2009 9:15 PM

Creating a Simple Registration Form in ASP.NET
This example shows how to create a very simple registration form in ASP.NET WebForms. STEP1: Creating the Database. The following are the basic steps on how to create a simple database in the Sql Server: Launch Sql Server Management Studion Express and then connect Expand the Databases folder from the Sql Server object explorer Right click on the Databases folder and select “New Database” From the pop up window, input the database name you like and click add Expand the Database folder that you have ......

Posted On Thursday, April 30, 2009 8:09 AM

FAQ: Displaying Image from Database to GridView Control
I wrote this demo because I observed that lots of people in the forum (forums.asp.net) always ask questions on how to display Image that was stored in the database to GridView control. Before reading this example, be sure that you have already know how to upload image to the database. If you are not familiar with it then I would suggest you to read my previous example about “Uploading and Storing Images to Database in ASP.NET”. In this demo, we are going to use a Handler.ashx file for fetching the ......

Posted On Friday, April 24, 2009 8:52 AM

Displaying Image to Image Control based on User Selection in ASP.NET
This example is a continuation of my previous example about “Uploading and Storing Images to Database in ASP.NET”. In this demo, I’m going to show how to display image (binary format) from database to ASP Image control and display its corresponding image information based on user selection. In this demo, we are going to use a Handler.ashx file for fetching the binary data from the database and then stream it. What is a Handler? A handler is responsible for fulfilling requests from a browser. Requests ......

Posted On Friday, April 24, 2009 3:15 AM

Uploading and Storing Images to Database in ASP.NET
This example demonstrates how to upload image using the FileUpload control and store the uploaded file in the database in binary format. STEP 1: Creating the Database. The following are the basic steps on how to create a simple database in the Sql Server: Launch Sql Server Management Studion Express and then connect Expand the Databases folder from the Sql Server object explorer Right click on the Databases folder and select “New Database” From the pop up window, input the database name you like ......

Posted On Thursday, April 23, 2009 11:13 AM

Displaying two Column Fields in DropDownList Control
There are two basic ways on how to display two fields from database in the DropDownList. The first one is concatenating it in the sql query and the second one is concatening it programmatically in codes. Manipulating the sql query to concatenate two fields. Here’s the code block below. private void BindDropDownList() { DataTable dt = new DataTable(); SqlConnection connection = new SqlConnection(GetConnection... try { connection.Open(); string sqlStatement = "SELECT CustomerID + ' ---- ' + ......

Posted On Wednesday, March 11, 2009 4:15 PM

Creating a Simple ShoutBox with MultiLine TextBox
Overview This demo explains how to create a simple ShoutBox using the ASP.NET MultiLine TextBox. A “ShoutBox” basically allow end users to post commentsin the page. To begin let’s create a WebUserControl and implement our ShoutBox there. Why UserControl? We used WebUserControl so that we can re-use and place the control anywhere in your page by simply dragging it to the WebForm. Step 1: Creating the Database In this demo, I presumed that you already have a basic background on how to create a simple ......

Posted On Tuesday, February 24, 2009 5:50 PM

Adding ASPNETDB.mdf file to SQL Server 2005
By default ASPNETDB will be automatically created under App_data directory in your application if personalization is use for the first time.If you wanted to locate ASPNETDB file in your Own Database (SQL Sevrer 2005) then just simply do the following -Copy the ASPNETDB that is located at the App_data Folder in your Apps and paste it anywhere in your drives.. the after copying -Remove the ASPNETDB in your App_Data folder -Open SqlServer 2005 or Studio Management Express -Right Click on Database Folder ......

Posted On Monday, February 23, 2009 4:40 PM

Custom Login: Validating UserName and Password using the ADO.NET way
The snippet below describes on how we are going to validate the user credentials being supplied by the end user in Login page using the ADO.NET way.. C# protected void ValidateUserInfo(string user, string pass) { SqlConnection connection = new SqlConnection("YOUR CONNECTION STRING HERE"); string sql = "SELECT * FROM TableName WHERE UserID = @username AND Password = @password"; SqlCommand cmd = new SqlCommand(sql,connection); cmd.Parameters.AddWithValue... user); cmd.Parameters.AddWithValue... ......

Posted On Friday, September 12, 2008 1:26 AM

Binding one GridView with Different tables from the database based on user selection
Biding one GridView with Different tables from the database based on user selection By: Vincent Maverick Durano This article demonstrates on how are we going to bind a GridView with different data from different tables based from the selection in the RadioButonList.. In-order to achieve this functionality then we need to dynamically generates a boundfield columns because the GridView will have different datafields to display. Also note that Im using the Northwind database here just for demo. STEP ......

Posted On Wednesday, July 23, 2008 5:02 PM

Creating Chart with Aspnet ReportViewer control
Introduction This article shows on how to generate a chart (a graphical representation of data) using the aspnet ReportViewer control. Basically, this report is called an rdlc file “Local Mode” which means that a report is generated at the client side and no connection established to the Sql Server Reporting Service Server. In this example, I am creating a report(chart) that would display the stock out movement. The page includes a DropDownList to allow users to filter a specific stock category that ......

Posted On Monday, February 4, 2008 2:04 AM

Creating a Data Access Framework
Introduction: This article describes on how to create a data access architecture using sqlclient objects that will returns a DataTable. It also discusses here on how to use and access a certain method in a particular class for you to manipulate the data into your codes. Please note that I am using the Northwind database here and all the codes in this article are written in C# language. STEP1: Adding a Class First, I added some folders under my App_Code folder to store some classes. This class includes ......

Posted On Friday, February 1, 2008 3:11 PM

Creating a Simple Data Access Framework in ASP.NET
Introduction: This article describes on how to create a data access architecture using sqlclient objects that will returns a DataTable. It also discusses here on how to use and access a certain method in a particular class for you to manipulate the data into your codes. Please note that I am using the Northwind database here and all the codes in this article are written in C# language. STEP1: Adding a Class First, I added some folders under my App_Code folder to store some classes. This class includes ......

Posted On Friday, February 1, 2008 9:35 AM

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