.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

how to Input data from textbox to unknown size of array or arraylist?

Posted By:      Posted Date: September 19, 2010    Points: 0   Category :ASP.Net

I am fresh to asp.net. I m using vb to write it. Could someone who is professional guide me?

I want to input data from textbox to "unknown size" array or arraylist, and bind it to gridview.

I have more than 1 data to input. Do i need to use loop to bind?

Thank you for your kind attention and patient.

View Complete Post

More Related Resource Links

how to get an array of all the asp.net textbox control inside create user wizard control?



How can I get all the textboxes inside a create user wizard control using getElementsByTagName().

Below is my JQuery code:

<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("asp:TextBox");
            for (var i = 0; i < inputs.length; i++) {
                inputs[i].onfocus = function() {
                    this.parentNode.getElementsByTagName("span")[0].style.display = "inline";
                inputs[i].onblur = function() {
                    this.parentNode.getElementsByTagName("span")[0].style.display = "none";



<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

Saving textbox data to MySql database in asp.net


Hi dear coders

though a very simple question to ask, but please tell me how to save and retrieve data in/from my textboxes to/from database (MYSQL) on submit button click.

i know its a very simple task but i cant make it done, so i request you to please send me some working example link or post any helpful code here in asp.net

i will be highly thankful for any kind help from you geniuses.



Query an arraylist of array list using linq


I have an array list called Customer. I t holds a list of array list which has the account details.

proj.customer -> collection of arraylist of type customer

proj.customer.account -> collection of arraylist of type account

Account array list holds type account and it has a poperty account balance. How can I query all accounts which has account balance  >100

I tried the following one

var Accountlist= from Account accountdetails in proj.customer.account

where accountid.balance >100

select accountdetails.id

But it is always throwing an error saying cannot cast type customer to type account

Please help

Input Validation: Enforcing Complex Business Data Rules with WPF


Windows Presentation Foundation has a rich data binding system that includes flexible support for business data validation. We take a look at implementing some complex data input validation scenarios that include customized data errors for users.

Brian Noyes

MSDN Magazine June 2010

Textbox not clearing on data add


Hi, I am new to ASP.Net development, trying to develo pa simple access based library system.

I am using panel to place a few textboxes and buttons on it, on page load, i open db conenction and bound textboxes to recordsets to show data (and navigate using first and previous buttons)

On add button I call a function to clear textboxes, so user can input data, then when i try to write the data back in DB it shows me textbox still showing old record from record set, means "textbox.text="" didn't work.

Any help or idea?


override error message (The value 'test' is not valid for Age) when input incorrect data type for in


Hello everyone,

I've tried to override error message when input incorrect data type in input field on HTML form. For example I have the model like this.

public class Person
public string FirstName {get;set;}
public int Age {get;set;}


For view, I put text input for Age to get it value.

When type some string in Age text box like 'test' and press submit button. I got this error message

The value 'xxx' is not valid for Age

However, I want to change this message and try many way. There 's nothing effect this message value.

Please could you help me to solve this problem.

chnage data of input type with readonly attribute


I have webform where i have different input type as text controls with a readonly attribute. I have option to edit the data so through javascript i remove the readonly attribute through javascript, here's the code 
function EditBillAddress()

How can i add a textbox into a GridView Cell dynamically and how can i retrieve entred data

Hey, i think that the the subject can explain what i need, it's about adding a TextBox control with the code behind into a GridView, and also about how can i retrieve entered data after submitting, im using C#,Thanks.

How to fetch data from textbox dynamically in a gridview

How to fetch data from textbox inside a gridview

Enter the date on the WPF DatePicker input textbox instead

When i type in the date on the date picker and check it on an lostfocus event and i try to read the text or selecteddate its blank?  Am i missing something.  I assumed typing in 5/11/2010 on the input box would either show up on the controls Text or the SelectedDate, but i may be missing something   Thanks

Wizard Control textbox data is lost

I'm using a wizard contol with several textbox fields. I have two textbox fields disabled (textbox19 and textbox20)because I don't want the user to change the values that are calculated from the other textboxes (see javascript below). I do this with javascript on the clientside. My problem occurs when the user is in STEP2 and goes back to STEP1 the values in the disabled fields are gone. Is there a way to fix this? I would also like to perform a validation on textbox20 but I haven't been able to do that with the textbox disabled. How can I do validations on a field that is disabled? I've tried enabling the fields and using readonly = true but that doesn't work either. Any suggestions? // Client Side script to do calculations <script type="text/javascript">       function calculateSubTotal() {      var txt6 = document.getElementById('<%= TextBox6.ClientID %>');     var txt12 = document.getElementById('<%= TextBox12.ClientID %>');     var txt18 = document.getElementById('<%= TextBox18.ClientID %>');     var txt14 = document.getElementById('<%= TextBox14.ClientID %>');     var txtSubTotal = document.getElementById('<%= TextBox19.Cl

set textbox size dynamically in RDLC

in Hi, Can some one tell me how to set the size and location of the text box in RDLC dynamically. I cannot access it code, i cannot use parameters or expressions to set this. Thanks

textbox AutoComplete not work in XP and missing data

When I use the application in XP, auto complete mssing some data~ Here is some of data, IRC-3100 IRC-3200 IRC-5180 when I type "IRC" in the textbox, the fellow didn't show and when I type "IRC-", only IRC-3100 show this issues only occur in XP and window 7 is OK. I don't know why, please help here us the code I use to add autocomplete source~   AutoCompleteStringCollection collection = new AutoCompleteStringCollection();   PropertyInfo ppty = typeof(SOURCE).GetProperty(displayProperty);   foreach (SOURCE s in sources) {   collection.Add(value.ToString()); }   else { collection.Add( string.Empty); } } box.AutoCompleteCustomSource = collection; box.AutoCompleteSource = AutoCompleteSource.CustomSource; box.AutoCompleteMode = AutoCompleteMode.Suggest;        ClarkC

Listview Toggle Visibility of a Textbox based on Data Not Null.

I want to toggle a Textbox to be visible (true, false) contained within an InsertItemTemplate based on the data being Null/Empty.   It Works in the Item Template since it is calling the "select parameters", but once it is in the "insert parameters" on databinds, I am unable to get this to work.  <%# String.IsNullOrEmpty(Convert.ToString(Eval("qu_8")))?Convert.ToBoolean("false"):Convert.ToBoolean("true") %> (works in Item Templates, but not in InsertItemTemplate to toggle a textbox to be visible or not visible). I am using C# in code behind. Thanks in advance -Mark

View data input validation

I got a view has a dropdownlist and a text box for user input.And the form is set to POST.So in order to validate the input of the text box for his age, ie integer, should I use [HTTPPost] above the action body?And use overload method?eg.- Action 1 to show the view useActionResult ShowView()- after the user press 'Submit' button on the view redirect to the action[HTTPPost]ActionResult ShowView(int age){}Just wonder to validate the age, what happen if the input is not integer? Should I redirect to ShowView()?

inserting an array of data into a database table

im looking to insert an array of information into a database tableessentially what id like to do is something like this:            objCmd = New OleDb.OleDbCommand("INSERT INTO pluINFO VALUES *", objConn)            For j = 0 To 265                objCmd.Parameters.Add( info(j) )            Next this code gives me a syntax error for the insert statement is there anyway i can set the insert statement that would allow me to add each element of the array(looping through rather than hardcoding several hundred entries) into the table?any input appreciatedThanks

Data Input

I would like to create a simple form that i could connect to a sql database that resides on the same server that sharepoint does and have the user enter data into individual fields, click a button on the form and that would insert the data into the database table that i created. is there a tutorial that will show me how todo this step by step?
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