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" June 2009 Entries
Adding Dynamic Rows in GridView with DropDownLists
Few days ago, a developer posts a comment in my previous article about “Adding Dynamic Rows in ASP.Net GridView Control with TextBoxes” asking if how to implement the same functionality with DropDownList. In this example, I will going to show on how to generate a Row in GridView with DropDownList when clicking a Button that is residing inside a GridView Footer and retain the Selected Items of the DropDownList on postbacks. Here are the code blocks below: ASPX Source: <html xmlns="http://www.w3.org/19... ......

Posted On Tuesday, June 30, 2009 2:19 AM

FAQ: Dynamically Adding Rows in ASP Table on Button Click event
I decided to write this simple example because I always encounter this kind of issue at the asp.net forums including this thread: http://forums.asp.net/t/144... Basically this demo shows on how to generate rows of TextBoxes in ASP Table on every click of the Button and retain the entered values on postbacks. Here are the code blocks below: ASPX: <html xmlns="http://www.w3.org/19... <head runat="server"> <title>Dynamic Adding of Rows in ASP Table Demo</title> ......

Posted On Monday, June 29, 2009 2:27 AM

ASPNET WebPart FAQ: Accessing Controls from UserControls in ASPX page
I decided to write this example because I always encounter this type of questions at the asp.net WebParts and Personalization forums. Many of us have used UserControls as WebParts so that we can incorporate different server controls in a single WebPart element and there are times we need to retrieve or pass a value to a Control that‘s inside a UserControl. So in this example, I will show different ways on how to get or pass values to a control that is residing within a UserControl. Suppose that we ......

Posted On Thursday, June 25, 2009 1:17 AM

Ways on how to Hide AutoGenerateColumns in GridView.
I decided to write this example because this has been asked many times before at the forums. As you may know, we cannot "directly" hide AutoGenerateColumns in our codes using the code below: GridView1.Columns[index].Vi... = false; Why? This is because auto generated columns are not added in the GridView columns collection.Using the code above will give you "index was out of range error". In this example I will show the different ways on how to hide specific column in GridView with AutoGenerateColumns ......

Posted On Wednesday, June 24, 2009 8:14 PM

Fill ASP.NET Table with data from DataTable.
Few days ago, one of the members at asp.net forums ask if how to display the data that comes from the DataTable to a Table, so I decided to post the solution that I have provided there as a reference to others. In this example I’m going to create a DataTable by hand and define the columns and row values manually and then display data to the Table. Here are the code blocks below: private DataTable CreateDataTable() { DataTable dt = new DataTable(); DataRow dr = null; //Create the Columns Definition ......

Posted On Wednesday, June 24, 2009 8:03 PM

Moving ListItems between Two ListBox – Client Side Approach
This example demonstrates on how to move items between two ListBox using JavaScript. Here are the code blocks below: <html xmlns="http://www.w3.org/19... <head runat="server"> <title>ListBox Demo</title> <script type="text/javascript" language="javascript"> function AddItemInList(fromLeftToRight, isAll) { var list1 = document.getElementById('&l... ListBox1.ClientID %>'); var list2 = document.getElementById('&l... ListBox2.ClientID %>'); if(Boolean(fromLeftToRight) ......

Posted On Tuesday, June 23, 2009 4:59 AM

Get All Server Control ID’s in the Page
This example shows on how to get all server controls ID in the page using recursive FindControl. Here are the code blocks below: protected void Page_Load(object sender, EventArgs e) { GetPageControlsID(Page); } public void GetPageControlsID(Control Parent) { string txBoxID = string.Empty; string ddListID = string.Empty; string lblID = string.Empty; System.Collections.Speciali... strColTxtBoxID = new System.Collections.Speciali... System.Collections.Speciali... ......

Posted On Tuesday, June 23, 2009 4:51 AM

Move TextBox Focus when Hitting Enter Key.
There are times that we need to use the enter key instead of using the Tab key for moving the focus of the TextBox controls from one to another to perform rapid data entry in the page. This example shows on how to achieve that with the use of JavaScript. Here are the code blocks below: ASPX: <html xmlns="http://www.w3.org/19... > <head id="Head1" runat="server"> <title>Demo</title... </head> <script type="text/javascript" language="javascript"> function controlEnter ......

Posted On Monday, June 22, 2009 9:09 PM

FAQ: How to Get Hidden Column values in GridView
I decided to write this simple demo because this issue has been asked many times at the forums. Hidden columns are fields in GridView that you don’t want to expose or show in the page, usually this field is the primary key of the data. Since a primary is a confidential data then you might want to hide it to the users. Most people usually use BoundField columns for displaying the data and just hide the field that contains the primary key. In this example, I will demonstrate two ways on how to access ......

Posted On Monday, June 22, 2009 5:57 AM

New ASP.NET Tutorial site
Just published few articles at ASP Snippets site. try to check the site and I'm sure you will find lots of useful articles there about ASP.NET... Good Luck! Technorati Tags: General ......

Posted On Monday, June 15, 2009 8:54 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

Adding Rows in GridView
This example shows on how to add rows of data in the GridView control. In this example, I created a simple database table called “Table1” for storing the data. The Table has the following columns: Id – PK Employees Position Team Note that I added some dummy data in table that I have created so that we can display something in the GridView when the page is loaded for the first time. To get started, let’s grab a GridView Control from the Visual Studio ToolBox and place it in the webform. Then set up ......

Posted On Tuesday, June 9, 2009 10:37 PM

Creating an Editable Label in ASP.NET
This demo shows on how to create an "Editable" Label in the page. As we all know, a Label control is intended for displaying read-only data information in the page and thus we cannot make it editable just like the TextBox control. As a workaround we can create a floating Div/Panel with a TextBox. Clicking on the Label will display a Div with a TextBox on it and a Button for updating the Text in the Label. In this demo, i used JavaScript for manipulating the elements in the page and apply a little ......

Posted On Tuesday, June 9, 2009 7:45 PM

Adding Dynamic Rows in GridView with TextBoxes
Introduction: I decided to write this article because this has been asked so many times before at the forums(http://forums.asp.net) . Basically, this example shows on how to generate a Row in GridView with TextBoxes when clicking a Button that is residing inside the GridView footer. To get started, let’s grab a GridView control from the Visual Studio Toolbox and put it in the WebForm. The mark up would look something like this: <asp:gridview ID="Gridview1" runat="server" ShowFooter="true" AutoGenerateColumns="false"... ......

Posted On Thursday, June 4, 2009 10:13 PM

Move AutoGenerate Columns at LeftMost Part of the GridView Columns
There are certain scenarios that we need to combine an AutoGenerated Columns with TemplateField Columns or even BoundField Columns in the GridView. As we all know, by default the GridView will automatically display all the AutoGenerated Columns to the rightmost column of the GridView. Consider this example below: Assuming that we have this GridView markup below: <asp:GridView ID="GridView1" runat="server"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:Button ID="Button1" ......

Posted On Wednesday, June 3, 2009 10:23 PM

Lists of WYSIWYG Editor
The following are the Lists of WYSIWYG Editor that you can pick: RadEditor (Telerik). AJAX-enabled. WebHtmlEditor (Infragistics). Cute Editor (CuteSoft) FreeTextBox (FreeTextBox.com). Free for basic edition. Source code available (for a price). Peter's Textboxes (Peter Blum). Suite of enhanced text box controls. UltimateEditor (Karamasoft) Asbru Web Content Editor (Asbru) ASP.Net XHTML WYSIWYG Editor (MoreNet) AspLib Component library (Astron Digital). Includes a WYSIWYG editor, among other things. ......

Posted On Wednesday, June 3, 2009 5:40 PM

How to: Generate Control Events that Resides within a GridView TemplateField
I decided to post this because this has been asked many times before at the forums. So for those who doesn't know how to generate a control event that are residing within the TempleFields of GridView then you can follow these few steps below: * Switch to Design View in Visual Studio Designer * Right Click on the GridView * Select Edit Template and then Select the Column where the Control that you wan't to generate the event resides (e.g Button, TextBox, etc..) * The GridView will then changed to ......

Posted On Tuesday, June 2, 2009 8:04 PM

Whoa Look at my Articles!
When I visit CodeASP.Net I found out that two of my articles there was included at the "Featured Articles" section in their home page. This has been a really great experience to me.. I will try to continue writing some other useful articles soon... Technorati Tags: Community ......

Posted On Monday, June 1, 2009 10:01 PM

Comparison Between Standard WebParts, ASPNET Futures WebParts and Custom WebParts in ASPNET 2.0
I decided to post this because I wan't to share this information that I have gathered during my investation about ASPNET WebParts last 2007. Maybe this will be useful for those who are using ASPNET WebParts in ASPNET 2.0. Basically this information shows the difference between the Standard WebParts that shipped in ASP.NET 2.0, ASPNET Futures and My Custom WebPart with Custom Verbs. Main OBJECTIVES: * Allows cross browser drag and drop capability (can be moved between WebZones) * Ajax enabled Findings ......

Posted On Monday, June 1, 2009 6:27 PM

Selecting One RadioButton Vertically and Horizontally
Recently I have encountered a question at the aspnet forums asking if how to select only one RadioButton vertically and horizontally in a Table.( see this thread). As you can see from that thread, the first solution that I was provided was to use a RadioButtonList Control because it allows you to set the RepeatColumns, RepeatDirection and RepeatLayout attributes. But unfortunately that doesn't actually meets the requirement of the Original Poster (OP). Basically the OP wanted to Select only one RadioButton ......

Posted On Monday, June 1, 2009 5:24 PM

Pre-Select Multiple ListBox items based on Database Value
I decided to write a simple demo about this because I always encounter this issue at the forums. Basically, this demo shows how to pre select multiple list items in the ListBox control based from database value. Assuming that we have this table definition with data below: As you can see, the Table has a "IsSelected" boolean field which indicates that a particular employee name is selected or not. Note that in this demo, I named the Table above as "Table1". Now lets set up our ListBox at the ASPX ......

Posted On Monday, June 1, 2009 1:45 PM

FAQ: Calculate Totals in GridView and Display it in Footer - Server side approach
I decided to write this post because I always encounter this kind of issue so many times before at the forums. The main question is that they want to automatically calculate the totals when a user enter an amount from the TextBox control that is residing in the GridView template. So this example shows the basic way on how to achieve this with the server side manipulations. Note that this demo requires that you know the basics of ADO.NET and for binding a GridView control with data from database. ......

Posted On Monday, June 1, 2009 1:20 PM

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