Save info   Get password
Home Submit your blog Edit Account Rules RSS-Archive Contact


Insert, Update, delete, paging in formview
2008-09-20 01:44:00
Insert, Update , delete , paging in formview The FormView control displays a single record of data. It provides a built-in mechanism for navigating from record to record; as well, it supports the updating, insertion, and deletion of a record. As a result, the FormView control provides a way to create a Web-based data-entry form somewhat analogous to the forms in a program like Microsoft Access


How To Change Gridview Row Color on Mouseover using css and Javascript
2008-09-20 01:43:00
How To Change Gridview Row Color on Mouseover using css and Javascript DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "-transitional.dtd"> Untitled Page .datatable tr:hover,.datatable tr.hilite { background-color: #DFE7F2; color: #000000; } var rows = document.getElement


How do you group related fields in HTML
2008-09-20 01:41:00
How do you group related fields in HTML The and tags are a great way to group related information in a form. These tags provide an easy means to group items visually, and are understood by screen readers and text-only devices, which can perceive that the tagged items are logically grouped together. This wouldn’t be the case if you simply wrapped the related items in a styled div users o


How To get selected value of dropdownlist using javascript
2008-09-20 01:40:00
How To get selected value of dropdownlist using javascript DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "-transitional.dtd"> Untitled Page .blue { background-color: #ADD8E6; color: #000000; } .red { background-color: #E20A0A; color: #ffffff; } .green { background-color: #3CB371; color: #ffffff; } .yellow { background-color: #FFF280; color:


How can I check whether left or right mouse button has been clicked?
2008-09-20 01:38:00
How can I check whether left or right mouse button has been clicked? To determine whether the user clicked the left or right button, you can use the following properties. # Event.which in Netscape Navigator # event.button in Internet Explorer DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "-transitional.dtd"> "" > Untitled Page "text/javascript">


How to change the row color of the Repeater based on some condition?
2008-09-20 01:37:00
How to change the row color of the Repeater based on some condition? DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "-transitional.dtd"> protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Repeater1.DataSource = GetCustomMadeDataTable(); Repeater1.DataBind(); } } protected string FormatColor


How To Add Custom DropDownList Pager in GridView
2008-09-20 01:36:00
How To Add Custom DropDownList Pager in GridView This post shows you how to add a custom DropDownlist pager and pager buttons to the GridView as shown below: DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "-transitional.dtd"> Untitled Page Goto Page


How to develop a row-clickable GridVIew control?
2008-09-20 01:35:00
How to develop a row-clickable GridVIew control? This post shows you how to develop a row Clickable GridView, clicking the row (e.g entire row, not specific column) in the control causes a postback and throws RowClicked event. This can be used to customize selections a user can make with the control.I added CSS class properties to the grid, to allow a different style applied to a row if ho


Searching Inside the GridView Control
2008-09-20 01:33:00
Searching Inside the GridView Control DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "-transitional.dtd"> Untitled Page Enter Search String


How to add a Text box in the Gridview Header?
2008-09-20 01:31:00
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.Header) { // Check the header type if (e.Row.RowType == DataControlRowType.Header) { Literal litHeader; TextBox txtSearch; // loop through each cell for (int i = 0; i


Passing Information Between Content and Master Pages
2008-09-19 03:32:00
To access the Master Page's methods or properties from a content page, reference the Master Page through the Page.Master property. This property returns an object of type MasterPage, so you'll need to explicitly cast it to the appropriate type before calling its methods or referencing its properties. Alternatively, you can set the @MasterType directive, which adds a property to the auto-generat
Read more: Content , Pages

How To Open Hover Menu on Mouse Over
2008-09-19 03:30:00
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "-transitional.dtd"> Untitled Page .popupMenu { position: absolute; visibility: hidden; background-color: #E3F2F7; opacity: .9; filter: alpha(opacity=90); } .popupHover { background-image: url(images/header-opened.png); background-repeat: repeat-x; background-position: left top; background-color: #DEB887
Read more: Mouse

Select GridView Row on Double Click
2008-09-19 03:29:00
Start with an existing GridView that is populated from a data source In the ItemDataBound event handler of GridView, you assign a JavaScript ondblclick method to the GridViewRow DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "-transitional.dtd"> Untitled Page using System; using System.Data; using System.Configuration; us
Read more: Select , Click

Tips -Master Page
2008-09-19 03:26:00
ASP.NET master pages are pretty handy and here is a simple tip to make them even easier to use. Using the Master Type reference in your content page allows you to refer to your master page properties without having to cast it to your master page type everytime. For example... allows me to write... this.Master.myProperty = "value"; rather than... ((myMasterType)this.Maste


How to find a cell value
2008-09-19 03:24:00
If you find yourself wanting to parse through a dataset for a particular cellvalue and you need to do this programatically, this might help a little.. DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "-transitional.dtd"> Untitled Page .Hide{visibility:hidden}; using System; using System.Data; using System.Configura


Working With ObjectDataSource And GridView
2008-09-19 03:20:00
1. Create Middle Tier class l Create static, stateless methods l Mark class and methods with DataObjectMethod attribute (requires using System.ComponentModel) 2. Configure Data Source · Choose a business object · Define data methods 3. Configure GridView · Check “Enable Editing”, etc. step1.Add a new project in VS.net step2. Add a class Custom


How To Add IsNumneric Function in C#
2008-09-19 03:19:00
How To Add IsNumneric Function in C# That's right, you can call VB's IsNumeric() function directly from C#. First add a reference to the Visual Basic compatibility assembly, Microsoft.VisualBasic.dll, which contains the function's implementation: import namespace using Microsoft.VisualBasic; DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "-transitional.dtd"> Untitle


IsNumeric C# equivalent
2008-09-19 03:18:00
IsNumeric C# equivalent IsNumeric in C#, WHY NOT? This is something that has bothered me for a long while now. Why doesn't C# have a IsNumeric(string num) function like VB.NET?I have used every kind of IsNumeric code you van think of... This is what I started with. public bool IsNumeric(string s){ try { Int32.Parse(s); } catch { return false;


UserControl and Event
2008-09-19 03:16:00
UserControl and Event I will create a new and very simple UserControl, to illustrate how to create events. It won't have a real life purpose, but is only meant to show you how to use events in a UserControl. First, we create a new, simple EventUserControl, with this code in it: Page title: All just text and server controls that we know. In the CodeBehind, it looks a bit like this: us


Working with postback of dropdown list inside Gridview
2008-09-18 05:55:00
Working with postback of dropdown list inside Gridview Many a times there are circumstances where by we need to use dropdown list inside a Gridview and also handle the index changed event of the dropdown list. The easy example of this kind of requirement would be when we nee to fill another dropdown list in the same row from the value selected in the first dropdown list. We all know that t


Using the RegisterArrayDeclaration Method
2008-09-18 05:55:00
Using the RegisterArrayDeclaration Method Let's create a simple Web page to demonstrate the RegisterArrayDeclaration method. This page provides a slide show where the client-side JavaScript changes the image. In this example, we will search a specified folder on the server and load the names of all the images in a JavaScript array. We will also provide two buttons, one for showing the next im


Adding/Using Embedded Resources in .Net Web Application/Class Library (C#/VB.Net/ASP.Net)
2008-09-18 05:55:00
Adding/Using Embedded Resources in .Net Web Application /Class Library (C#/VB.Net/ASP.Net) In .Net when you don’t want to relay for a file on physical location, then it is very good option to take an advantage of Embedded resources. Using embedded resources you can add any file type in the assembly/DLL/EXE when they get compiled. And whenever you want to use it, load it from the assembl


How to hide and show data in the DataList?
2008-09-18 05:55:00
How to hide and show data in the DataList? DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "-transitional.dtd"> Untitled Page using System; using System.Data


How To change the background image of html table placed in gridview's template field.
2008-09-18 05:55:00
How To change the background image of html table placed in gridview's template field. DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "-transitional.dtd"> Untitled Page


Using the RegisterArrayDeclaration Method
2008-09-18 05:55:00
Using the RegisterArrayDeclaration Method Let's create a simple Web page to demonstrate the RegisterArrayDeclaration method. This page provides a slide show where the client-side JavaScript changes the image. In this example, we will search a specified folder on the server and load the names of all the images in a JavaScript array. We will also provide two buttons, one for showing the next im


Extend BoundField Of GridView
2008-10-03 01:09:00
. In this post i will show you how to extend BoundField Column of Gridview to add MultiLine support Step 1.Place the code in app_code directory using System; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace CustomBoundField { public class BoundTextBoxField : System.Web.UI.WebControls.BoundField { public TextBoxMode TextMode { get { Te
Read more: Extend

How To Add Tooltip in GridView
2008-10-03 01:08:00
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "-transitional.dtd"> Untitled Page


Building a Simple CSV Parser in C#
2008-10-03 01:07:00
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.IO;using System.Collections.Generic;public partial class ParseCSV : System.Web.UI.Page{protected void Page_Load(object sender, Event
Read more: Building , Simple

C# Tutorial - Extension Methods
2008-10-03 01:06:00
take a look extension methods, which is a language feature introduced to C# in .NET 3.0. Extension methods are a piece of syntactic sugar that allow you add new functionality to a class that you don't have direct access to. Sound cool yeah? Cause it is.
Read more: Tutorial , Methods

C# Tutorial - The Readonly Keyword
2008-10-03 01:05:00
C# has a ton of keywords, and it is sometimes hard to keep track of them all. One keyword that often gets lost in the shuffle is the readonly keyword, often because many people just group it with the const keyword and leave it at that. Well, the readonly keyword deserves better than that - and so here today we are going to talk about what exactly it does, how it differs from const, and why yo
Read more: Tutorial , Keyword

Page 1 of 2 « < 1 2 > »
eXTReMe Tracker