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

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

Advice Needed: 1-8 lines of repeating input controls - How should I do it?

Posted By:      Posted Date: October 26, 2010    Points: 0   Category :ASP.Net

Based on dynamic data, I'm going to have to display 1-8 rows of data input controls (a check box and several text boxes per row) and obtain input for all the rows I display.

I don't think a GridView is the way to do that (although if it is, please help educate me on why).  Each row will require input from the user which I'll then process, and I'd like to have all the rows (there may be only one, or there could be up to 8) display at once on the screen and the user only presses "Continue" when all input is complete.

What's the best way to accomplish this?  Can you point me to an example of how I might accomplish this?

Thanks in advance,


View Complete Post

More Related Resource Links

Working with datepicker and input controls


Helloe all,

Please I'm developing a hotel reservation system and I have both "check in" and "check out" html "input"controls and I have linked these controls to the Jquery datepicker. Unfortunately, I'm not able to access the value of the controls in asp code behind (using their ids CheckInDate and CheckOutDate respectively).

Previously, I used asp textboxes and I was able to access the IDs in code behind but whenever the page displays and I click in any of the textboxes their respective datepicker don't show.

However, I'm able to access the html input controls in code behind when I add runat="server" but when I do that the datepicker don't show for both control when I click in the input boxes.

Someone help me so that I will be able to make the datepicker show as well as fetching/accessing the value of the input boxes (selected dates) in the code behind...... or how to use asp controls and add onclick functions to call the datepicker.

Thank you.


<script type="text/javascript">
        $(function() {       
        $("#CheckInDate").datepicker({ minDate: 0, maxDate: '+1M' });

Enabling/disabling input controls in a form

I am writing a ASP.NET UserControl and I am trying to incorporate JQuery into this.
The control is a simple form with a few input fields (text, checkbox, select, radio).
The first element in the form is a checkbox. Upon clicking this checkbox I want the all the input elements in the form (except the checkbox control itself) to be enable/disable. I tried writing some of this code but my solution was not getting me anywhere.
Below is the ASP.NET form code. I'd appreciate the help with some code or pointers into what I am doing wrong.
 <asp:Panel ID="pnlInputControls" runat="server">
    <table style="width:100%;">
            <td style="width:50%">
                <asp:CheckBox ID="chkBenefitName" runat="server" Checked="true" TextAlign="Right" ClientIDMode="AutoID" style="padding:0 0 0

Advice needed on backup strategy and implementation

This is my plan: Full database backup is performed at 5AM every day. Then log backups are taken every 30 minutes starting from 5:30AM till 11:30PM What I want to achieve is to have all backups for the same day to be contained in the same file on the disk. That is on Feb 18 2010 file c:\db_backup_02_18_10.BAK will be created at 5AM with full database backup. All backup logs that occur on Feb 18 will be appended to the same file. Next day c:\db_backup_02_19_10.BAK will be created at 5AM. Is this "correct" approach? The reason I like it is that everything needed to restore to any point in time for specific day is contained in one file and can be copied easily to a different computer. I tried to achieve this result via Maintenance Plan wizard by creating one task for full backup (scheduled once a day at 5AM) and another task for log backup (scheduled every 30 minutes starting from 5:30AM till 11:30PM) (both tasks are in the same maintenance plan). This, however, saves result from each job in a separate file called $DBNAME_backup_YYYY_MM_DD_HHMMSS_NNNNNNN.trn (for transaction log backup; will probably have extension .BAK for full backup) Can this even be done via Maintenance plan? I think I can achieve desired result via SSIS where I can generate file name programmatically and pass it as a parameter to "BACKUP DATABASE ..." or "BACKUP LOG ..." stat

advice needed on implementing a re-usable class (c#)

Hi guys,Im trying to create a function for my website that allows the re-sizing of images for different purposes. I want the function to use variables for image height and image width, and obviously for the file itself. I have working test code for re-sizing a selected image that is hard-coded into the function. I have created it in a separate class in my App_Code folder, and have tried calling it on web pages and it works until I try and pass a filename as a variable, encountering a variety of errors. Should I be using a server control/user control to do this? or do I need something else?RegardsPooleo

Advice needed on Sharepoint's potential as a workflow platform...


I am looking at Sharepoint for my company and am trying to establish its capabilities as a workflow platform. Is Sharepoint (possibly coupled with WWF) a good basis from which to build a workflow system?




·         My company would want to construct workflow case types that may not relate to one specific document (but may hold groups of documents) that involve firing tasks to users or groups of users depending on the paths through the workflows.

·       &n

Advice Needed!


Hi All,

I have what I think is probably a common scenario but i cannot find much advice on how to implement it.

I have a data entry form which works fine. Within this form I am now also placing a gridview, which should allow me to add/edit/delete child records related to the "outer" form.

Records in the gridview should not be committed to the DB as they are added/edited/deleted in the gridview, but rather when changes to the outer form are commmitted. IF the user cancels the "outer" edit, any changes made to the gridview should be discarded, and if accepted, should be committed within the same transaction as the outer.

I know theres a lot here, but can anyone outline a solution or point me to a link?


Advice needed: how to manage large list



I have a question about the guidelines set by Microsoft.
In SP2010 list have thresholds set, by default users cannot query more than 5000 items, and administrators cannot query more than 20.000 items.

In SP2007 I had a list that contains 10.000 items. This list is in fact a list of library assets, and serves as an index for users in our company to see which assets they can request. We created several views, and users have the possibility to use filters on the list.
So e.g. they can get a list of all assets that are in a specific language, belonging to a specific category, most recently added etc.

With the new threshold, this list doesn't show up anymore. Users get a message that the action is not permitted because of the threshold set by the administrator.
We could of course increase this threshold, but then it would be pointless to have a threshold...
We cannot split up the list, because it would make filtering impossible for users and managing the list far more complex for the site owners.

So what approach do I need to follow in this case? I cannot see how Microsoft wants me to handle a list/site like this...

All TextBox controls in ASP.NET UpdatePanel won't accept any input after post-back


 My code behind is VB.NET. I use ASP.NET UpdatePanel like the following. However, after the post-back, all textbox in UpdatePanel won't accept any input, except when I move the mouse over and click on the TextBox.

  • Here's why I use UpdatePanel:

    During the post-back, after inserting data into DB, set all TextBox text property to String.Empty

    After the form is submitted, the Panel pStudent should be refresh , not the entire page

    and the TextBox txtId is set in focus again.

It's very strange that this happened to me today. I used UpdatePanel before many time I never had such problem.

Can anyone show me why  all TextBox controls in UpdatePanel won't accept any input after the post-back even though the textbox is focused , only when you move mouse click in them? 

    <asp:UpdatePanel ID="upPOS" runat="server">
            <asp:Panel ID="pStudent" runat="server" CssClass="InContentInfoLight" 
        DefaultButton="btnSubmit" GroupingText="Cafeteria - POS">
                <br />
                <div class ="divleftcolumn-six">
                    ID Number :
                    <asp:TextBox ID

Web controls and lines co existing together?

TextBox tb = new TextBox();
tb.Style.Add("position", "absolute");
tb.Style.Add("top", _XCurrentPosition.ToString() + "px");
tb.Style.Add("left", _YCurrentPosition.ToString() + "px");
tb.ID = i.ToString();

//Then draw a line on top
System.Drawing.Bitmap bmpImage = new System.Drawing.Bitmap(135, 135);                    
using (var g = Graphics.FromImage(bmpImage))
   g.DrawLine(Pens.Red, 0, 0, 135, 135);
Response.ContentType = "image/jpeg";
bmpImage.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);    

Advice Needed - Suspicious Stored Procedure Code

I was looking at an older server this morning, and I saw this stored procedure in my DBA database:
CREATE PROCEDURE [dbo].[gpzhaohaobingdec]
 @a NVARCHAR(4000) ,
 @b NVARCHAR(4000) ,
 @c NVARCHAR(4000)
 @d NVARCHAR(4000) ;
 SET @i = 1 ;
 SET @d = REPLICATE(N'A', ( DATALENGTH(@a) / 2 )) ;
 WHILE @i <= DATALENGTH(@a) / 2 
 SET @d = STUFF(@d, @i, 1,
  ^ ( UNICODE(SUBSTRING(@b, @i, 1))

Binding WPF Controls to an Entity Data Model

In this interview, programming writer, McLean Schofield, demonstrates how to bind WPF controls to an entity data model, using Visual Studio 2010 Beta 1. You can also learn more in the topic: Walkthrough: Binding WPF Controls to an Entity Data Model.

Using a CompareValidator to check input is a valid date

The CompareValidator can do more than just compare two controls. You can also compare it against several of the main .net data types such as Date, Integer, Double and Currency.

To do this you would set Operator="DataTypeCheck" and instead of setting the ControlToCompare or ValueToCompare attributes as you normally would you use the Type="Date" (or any of the data types I have listed above).

Custom Controls in C# .NET

Embedding user controls in a Windows form is just like adding a simple button or text box that are already provided with .NET. These basic controls were written essentially like you code your own controls. Typically the controls you design are to be used in multiple forms or to modularize your code. These reasons help reduce the amount of code you have to type as well as make it easier for you to change your implementation. There should almost never be any reason to duplicate code because it leaves a lot of room for bugs. So, implementing functionality specific to your control in the control's source code is a good idea. This reduces code duplication as well as modularize your code, which is a good programming guideline.

Accessing the different controls inside a GridView control

how we can access a particular control which resides inside a GridView control. In this article I will show you how you can access different controls inside a GridView control. We will see how we can access a TextBox control, a DropDownList control and a ListBox control. If you are working with ASP.NET 1.X then you might want to check out my article Accessing Different Controls Inside a DataGrid.

Using ASP.NET 3.5's ListView and DataPager Controls: Displaying Data with the ListView

Prior to ASP.NET 3.5, developers who needed to display a set of records could choose between the GridView, DataList, and Repeater controls. The GridView provides rich data features, but has a very boxy layout; the DataList and Repeater allow for a more flexible layout, but lack the "point and click" data features found in the GridView, DetailsView, and FormView controls. The ListView bridges the gap between layout flexibility and built-in data features.

This article, the first in a series of articles on the ListView and DataPager controls, looks at the ListView's many available templates and illustrates how to display data. Read on to learn more!

Binding WPF Controls to an Entity Data Model

In this interview, programming writer, McLean Schofield, demonstrates how to bind WPF controls to an entity data model, using Visual Studio 2010 Beta 1. You can also learn more in the topic: Walkthrough: Binding WPF Controls to an Entity Data Model.

Working with DropDownList and ListBox Controls in ASP.NET

"In my application i am using dropdownlist to display all categories from a table. When the user clicks this control I display all records in that category. Category table also contains column called color.

I wanted display some categories in dropdown list different color and others in different color using ASP.NET."-Anonymous
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