.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

i need the row index value in the form of "comma Separated value"

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :ASP.Net
hi, i am new to the C# in one of my page i need to pass the gridview rowindex vaule where the check box is checked true [i.e in comma sepparated vaule] this is my html code <tr>  <td>  <asp:GridView ID="GridView1" runat="server" EmptyDataText="THERE IS NO DATA FOR THIS REQUEST">  <Columns>  <asp:BoundField DataField="Tablelevelid" HeaderText="att_ID" />  <asp:TemplateField>  <HeaderTemplate>  <asp:CheckBox ID="checkAll" runat="server" onclick="checkAll(this);" /></HeaderTemplate>  <ItemTemplate>  <asp:CheckBox ID="CheckBox1" runat="server" onclick="Check_Click(this)" /></ItemTemplate>  </asp:TemplateField>  <asp:BoundField DataField="NAME" HeaderText="Name" />  <asp:BoundField DataField="PROJECT_ID" HeaderText="Project" />  <asp:TemplateField HeaderText="Comments">  <ItemTemplate>  <asp:TextBox ID="txtComments" runat="server" Text="" MaxLength="250"></asp:TextBox></ItemTemplate>  </asp:TemplateField>  <asp:TemplateField>  <ItemTemplate>  <asp:Require

View Complete Post

More Related Resource Links

Contact Selector - Form tab index is lost after selector resolves names on blur


I'm working with an InfoPath2007 form developed to be filled-out through the browser on a SharePoint 2007 site, and I'm testing using Internet Explorer 7.  It's a straight-forward form, with a number of text fields and two Contact Selector controls.

The issue I'm encountering is with the Contact Selector control, where if the actor only enters a partial name into the text-field and then TABs away from the control the form will perform its auto-postback to look-up and resolve the partial name (showing the name resolution dialog is necessary), and afterward the actor's cursor is focused on the next field in the form.  The actor can type text into the focused field, but any subsequent pressing of the TAB key returns the actor's focus to the browser's ADDRESS bar, which is incorrect as it should proceed to the next field in the form.  I understand that the Contact Selector needs to perform its postback to perform the name resolution (so that there is no way through the InfoPath form designer to disable postbacks for the control), but why does the browser not know how to continue the TAB order of the fields on the form even when a field has focus?

JQuery Validate plugin to validate a ASP.NET Form

The first time I used the JQuery Validate plugin, it did not work at all, see JQuery Validate odd behaviour with the ASP.NET Script Manager for reason, but perseverance and stubbornness prevailed and I finally created my first JQuery validated ASP.NET Forms contact form.

How to use getElementById to get the elements in a form

There are many ways of accessing form elements, of which the easiest is by using the cross-browser W3C DOM document.getElementById method. Before we learn more about this method, it would be useful to know something about the Document Object Model (DOM), the concept of HTML nodes or elements, and the concept of containers.

Each time you load an HTML page, the web browser generates an internal representation of the page in the form of an inverted tree structure. Let us look at a simple form. We will use this form later to demonstrate the use of the getElementById method.

Form view in ASP.NET


hi all...!
i have a database and i create a form with button edit,delete, New Registration..using Formview in asp.net..
everything was working good...

And i write SQL statement to get New ID number into dropdownlist/TextBox when i click button "New Registration".

i can get new(next) ID number after read database
it's also working good

Now i want change it to get ID which was deleted from table and replace the ID with new record...what i need is when i click "New Registration" i want get deleted "ID" first and then go to new record ID...

my code is here:-it working for get next ID after read database.

FROM Table1
AS boon WHERE PANG &gt;300000

form feild hints are not displaying for textboxses inside create user wizard?



I'm using following JS code to display input hint box besides the textbox whenever that asp.net textbox receives focus. 

I'm doing this for a registration form and all of the textboxes are inside the asp.net create user wizard control.

<script type="text/javascript">
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {

function prepareInputsForHints() {
	var inputs = document.getElementsByTagName("TextBox");
	for (var i=0; i<inputs.length; i++){
		// test to see if the hint span exists first
		if (inputs[i].parentNode.getElementsByTagName("span")[0]) {
			// the span exists!  on focus, show the hint
			inputs[i].onfocus = function () {
				this.parentNode.getElementsByTagName("span")[0].style.display = "inline";
			// when the cursor moves away from the field, hide the hint
			inputs[i].onblur = function () {
				this.parentNode.getElementsByTagName("span")[0].style.display = "none";

How to pass value to another form


Dear experts,

                     I have QuoteNumber filed in Db.aspx(ddquote.txt) i want to pass this QuoteNumber values(values should to another web form/page i.e. mail.aspx when i click mail button, Message should supposed to display in textbox(txtQuote.txt) of mail.aspx form/page is "You are sending "QuoteNumber"  quotation to "MailID", Thanks.




Validate form input - Japanese


 I've searched for several hours and haven't come up with a reference - or even many discussions - of how to go about validating Japanese names, addresses, etc. When I lived in Japan websites, atm's etc. required such info to be entered with the roman alphabet but I've seen some websites that are allowing Kanji/Hiragana/Katakana. I haven't tested many of them for validation but one that I did test (after looking at the page source and discovering no client-side validation) allowed me to put this in the name field: J*=123*go^ Neat!

Any pointers/references? Thanks

Form Filler: Build Workflows to Capture Data and Create Documents


Learn how to create a workflow that uses InfoPath forms and other office documents for passing data to targeted activities and for use in Office documents.

Rick Spiewak

MSDN Magazine June 2008

InfoPath 2007: Designing Form Templates With The New Features Of InfoPath


InfoPath 2007 is an XML forms designer and editor, and a fully featured and integrated member of the Office family. This article takes a sneak peek at some of its new features.

Scott Roberts and Hagen Green

MSDN Magazine August 2006

C++ at Work: Form Validation with Regular Expressions in MFC


I thought I'd use this month's column to describe an interesting app I built using the RegexWrap library described in my article "Wrappers: Use Our ManWrap Library to Get the Best of . NET in Native C++ Code" in this issue.

Paul DiLascia

MSDN Magazine April 2005

Cutting Edge: Form-based Programming in ASP.NET


One of the most common snags that ASP developers encounter when they first approach ASP.NET is that managed Web applications must be written according to a single-form interface model. Find out how it works.

Dino Esposito

MSDN Magazine May 2003

Command Management: Use Design Patterns to Simplify the Relationship Between Menus and Form Elements


In Windows Forms applications, similar commands, such as those in a menu and their counterparts on a toolbar, are not automatically related. They don't fire the same event or run the same handler routine. Yet code that allows the same or similar user commands to fire the same code simplifies development.This article describes the principles of command management and why it's important to have functional commands that are not exclusive to any one UI element. In order to provide an MFC-like command management infrastructure, a design pattern is developed and applied as a series of C# classes.

Michael Foster and Gilberto Araya

MSDN Magazine October 2002

Commerce with ASP.NET: Leverage the Authentication and Form Validation Features of ASP.NET to Bolste


If you're planning to build an e-commerce site, you'll be pleased to see that ASP.NET makes it easier than ever. Existing controls can be used and extended to add a great deal more functionality than you might expect. In this article, forms-based authentication is used to verify the identity of users and make certain areas of the site, such as the check-out page, inaccessible to unauthorized users. The power and flexibility of validation controls are demonstrated using the CustomValidator control to connect to a Web Service that verifies addresses. A shopping cart is then implemented in ASP.NET using the DataGrid, and finally, credit card authorization and billing are performed.

Jason Lefebvre and Robert Lair

MSDN Magazine August 2002

ASP.NET: Develop Polished Web Form Controls the Easy Way with the .NET Framework


Pre-built custom controls make application design easier and faster and allow you to maintain UI consistency. However, prepackaged controls can be big and slow, and are OS-specific. For those who don't want to use prepackaged controls, Visual Studio .NET provides controls for Web Forms similar to those found in Windows Forms, including label and textbox, and new additions such as the DataGrid, all of which you can customize. If you want to design your own controls, the .NET Framework provides inheritable classes that take care of all the nasty stuff you want to avoid, including page lifecycle, maintaining state across invocations, and browser detection. This article discusses these concepts, as well as eventing, rendering, and client-side scripting.

David S. Platt

MSDN Magazine June 2002

ASP.NET: Selectively Enable Form Validation When Using ASP.NET Web Controls


Sometimes the extra controls that come with Visual Studio .NET can be a bit inflexible or they just don't provide enough functionality or flexibility for all situations. The ASP.NET form validation controls, while powerful and easy to use, require that the entire page be valid before it's submitted back to the server. Through the use of the new object-oriented features of Visual Basic .NET, it is possible to extend their functionality to overcome this limitation. This article tells you how and helps you decide when it's a good idea to keep validation on the client and when you'd be better off disabling it.

James M. Venglarik II

MSDN Magazine April 2002

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend