.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

Please find out the logical error in my coding

Posted By:      Posted Date: August 27, 2010    Points: 0   Category :ASP.Net

Hi members,

              Please find out the logical error in my coding..

             I have grid view which was filled with checkbox ,empid, empname

             At present i filled 3 rows in gridview...

            And also i have one button outside the gridview

I need,

           When i click on the button...The empname which is corresponding  the particular row (which was selected in checkbox)...Should get displayed..

         My coding is..


    ArrayList arrayCheckbox = new ArrayList();
  protected void ButtonName_Click(object sender, EventArgs e)
        for (int i = 0; i < GridViewTest.Rows.Count; i++)
            CheckBox cb = (CheckBox)GridViewTest.Rows[i].Cells[0].FindControl("checkboxItems");
            if (cb.Checked==true)
                arrayCheckbox[i] = (String)GridViewTest.Rows[i].Cells[2].Text;

        for (int i = 0; i < arrayCheckbox.Count; i++)
            Response.Write("<br> Name is" + arrayChe

View Complete Post

More Related Resource Links

Error: Do you want to save this file, or find a program online to open it?



I am relatively new to MVC , i am getting the following error when i try to browse to a page in which i have used usercontrol and within the usercontrol i have a simple grid.

Error: Do you want to save this file, or find a program online to open it?

I am returning the data from the controller like this

 var jsonData = new
                    total = 1,
                    page = 1,
                    records = myRequests.Count,
                    rows = new[]{myRequests.ToArray()                 

Error - "Specified element is already the logical child of another element. Disconnect it first."

What I have is a Grid with each cell containing its own canvas.  I have a UserControl (uc) that I want to be able to drag/drop to other cells within grid.  I was able to get my drag/drop of the uc working except for the error in the subject.  On a drag/drop of a uc, I determine the canvas the drag started in, get a reference to the uc, clear the original canvas's children and add the uc to the new canvas.  The wierd thing about this error is that it is not entirely consistent.  Sometimes, I can drag the uc around to three or four different cells before receiving the error.  I have read multiple posts about this error but I don't seem to be able 'disconnect' the uc from its original logical parent.  Help is appreciated.

SSIS throws error when it doesn't find file

Hello All, I am facing one issue that i dont know in advance if there is file on FTP or not. I scheduled a job which runs every hour which in turn calling SSIS package. Now, when there is file on FTP, it works fine. But, when there is no file on FTP then itthrows error which i want to handle. Is it possible to check for any files present on FTP? Cheers, Pranav

Error: 0x80070002 The system cannot find the file specified

From Windows Server 2003 Std Ed SP, 32 bit VMWare Virtual Server .Net Framework v1.1.4322 When attempting to run a hello world aspx page it fails to load returning the message "Server Application Unavailable".  The application even viewer logged the following: Event Type: ErrorEvent Source: ASP.NET 1.1.4322.0Event Category: NoneEvent ID: 1088Description:Failed to execute request because the App-Domain could not be created. Error: 0x80070002 The system cannot find the file specified. I tried to run aspnet_regiis.exe -i, rebooted but this did not work. I tried to uninstall, reboot, reinstall .net from the Windows component section of Add/Remove Programs. Does anybody have any ideas? thanks, MP

How to find the Error

Hi, I have built my first MVC site and While developing I have decide to publish it and keep working on it while it's on line .  On the regular MVC register page after registering I'm getting  redirect to the default MVC  error page , I would like to find out what's the error ( I assume something with the  SQL DB/server   How can I get like in regular asp.net the Error type so I can correct it ? Thanks A.

Export-SPWeb "cannot find spweb object with id or url" error

How do we just export and import a library or a list using Export-SPWeb and Import-SPWeb? I tried exporting just a library with Export-SPWeb, but it throws an error : Could not find an SpWeb Object with Id or URL “http://<server:port>/Shared Documents”. The same thing goes for a simple list like Tasks: "http://<server:port>/Lists/Tasks". Any help would be much appreciated

Error: Specified element is already the logical child of another element. Disconnect it first. with

I'm building an application in which I've created several WPF user controls.  The user controls are essentially 'panels' that will hold content with controls around the outer edge.  The XAML for the main window uses one of these user controls and is attempting to set its content to two other user controls in a dockpanel. Basically, it's to place two smaller panels (one upper and one lower) inside a larger, outer panel.  (See XAML below.) I can place one user control inside the other without a problem.  But when I add the second user control, I get the dreaded: Specified element is already the logical child of another element. Disconnect it first. I really don't understand why.  My understanding of the error is that it comes from attempting to place the same element within the visual tree twice.  An element can't have two parents.  However, each of my user controls is completely separate.  Their underlying viewmodel code derives from the same base class, but each user control is separate.  I'm not even trying to place two of the same kind in there at the same time.  I thought at first that it might be that I had elements named identically in the different controls, so I renamed them so that all are unique.  It makes no difference. So far as I can tell, there are not any duplicate elements anywhere,

Unable to install SQL Server 2005 Express: The error is (-2146885628) Cannot find object or propert

I am installing 2 instances of SQL Server 2005 Express for 2 different accounting packages on Windows XP SP3.  I have the first installed, after much use of the forums.  The version of setup.exe was 2005.90.2047.0. I am not able to install the second, for Microsoft Office Accounting 2009, setup.exe version 2005.90.3042.0.  The error I am getting in Summary.txt is: Error String    : The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually." The error is  (-2146885628) Cannot find object or property. Error Number    : 29503 The errorlog file for MSSQL.2 has a lengthier description: 2009-09-05 23:00:32.13 Server      Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86)     Feb  9 2007 22:47:07     Copyright (c) 1988-2005 Microsoft Corporation     Express Edition on Windows NT 5.1 (Build 2600: Service Pack 3) 2009-09-05 23:00:32.31 Server      (c) 2005 Microsoft Corporation. 2009-09-05 23:00:32.31 Server      All rights reserved. 2009-09-05 23:00:32.32 Server      Server process ID is 5516. 2009-09-05 23:00:32.32 Server      Authentication mode is MIXED. 2009-09-05 23:00:32.35 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG\ERRORLOG'. 2009-09-05 23:00:32.38 Server      Regi

How to find in which line no error occoured debuging not work

System.NullReferenceException: Object reference not set to an instance of an object at ASP.document_down_upload_aspx.__Render__bctrl_23 (System.Web.UI.HtmlTextWriter __output, System.Web.UI.Control parameterContainer) [0x0008a] in /home/rajiv/Documents/8erp_final (2)/erp/Document_Down_Upload.aspx:24 at System.Web.UI.Control.RenderChildren (System.Web.UI.HtmlTextWriter writer) [0x00000] in <filename unknown>:0 at System.Web.UI.HtmlControls.HtmlHead.RenderChildren (System.Web.UI.HtmlTextWriter writer) [0x00000] in <filename unknown>:0 at System.Web.UI.HtmlControls.HtmlContainerControl.Render (System.Web.UI.HtmlTextWriter writer) [0x00000] in <filename unknown>:0 at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter writer) [0x00000] in <filename unknown>:0 at System.Web.UI.Control.RenderChildren (System.Web.UI.HtmlTextWriter writer) [0x00000] in <filename unknown>:0 at System.Web.UI.Control.Render (System.Web.UI.HtmlTextWriter writer) [0x00000] in <filename unknown>:0 at System.Web.UI.Page.Render (System.Web.UI.HtmlTextWriter writer) [0x00000] in <filename unknown>:0 at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter writer) [0x00000] in <filename unknown>:0 at System.Web.UI.Page.RenderPage () [0x00000] in <filename unknown>:0 at System.Web.UI.Page.InternalProces

Getting Error in Sql coding when i use it in Remote Server



I am getting Error in this code. I mention my ERROR in BOLD Letter in my Coding.. And i show u the Connectionstring Too.

BUt this code is working Perfectly in My local "Connectionstring"

Plz Help Me to solve this error.

Conn = New SqlConnection("Data Source=xxx.xxx.xxx.xx;Initial Catalog=xxxxxxxxxxxxx;Persist Security Info=True;User ID=xxxxxxxxxx;pwd=xxxxxxxx;MultipleActiveResultSets=True")

If (Conn.State = ConnectionState.Closed) Then
 End If
            ErrMsg = ""
            StrQry = ""
            StrQry = " select * from MO_users where({ fn LCASE(username) } = { fn LCASE('" & Username & "') }) " & _
                      " and (CAST(password AS binary) = CAST('" & Password & "' AS binary)) and status='1'"
            Cmd = New Sql

403 Error - been through many ms kb and threads and can't find resolution


Hi All,

I recently installed WIN 2008 R2 64 bit on a virtual machine where the host is WIN 7 64 bit.   The virtual machine is run through vmware workstation.  MOSS 2007 SP2 was then installed and all windows and sharepoint updates were applied.  The configuration wizard was run without any errors.

The ERP company I work for has released webparts, I ran the install and that went smoothly as well.  I configured these webparts as per the documentation and entered the connectivity info for the SQL Server 2005 SP3 database. 

From windows 7 client (host computer) I used IE8 to open http://pwtserv/VisualWeb/default.aspx.  This is reallly just the navigation tab and there are no web parts on this page.  I clicked on another tab that included the web parts and the first time everything was fine (signed in as my local user that has rights to the server, etc.).  The content displayed correctly.  The next time I logged in and navigated to the same page I got the 403 error.  I hit refresh about 3 times and on the 3rd time the content displayed again (the other two times I saw the 403 error).

I've been searching for days on google on what might be the problem.  Obviously most are saying it's permissions.  I've checked permissions ever

How can I avoid error a Insert Store proc if he don't find any coloum in a table


I have created one Insert Proc for a table which has three Colourm. 

Id int, [Name] varchar (30), Phone varchar (15) I want to use this proc for another Table which has two coloum which is semiler with first table lie   Id int, [Name] varchar (30) I want to use one Insert Store Proc For two Table. I can avoid null value of parameter but but can't avoid if the coloum is not exist. 



2 Questions about serialization and error coding...


1. When using serialization on a controller any associated/aggregated classes returned an error that they weren't serialized. If I add serialization to these classes will they load automatically when I deserialize the controller class saving me many lines of code?

2. Slightly more complicated. I'm doing a project that requires a text editor to have error correction for a particular language like VS does for c#,VB etc. This is going to be like BlueFish editor where you select the language and it tells you if there are mistakes with the code etc. As a small project it won't have full functionality but it's the code structure and OO technique that's important. Can anyone advise me or show example of the best and most efficient way to achieve this? I'll be doing my own research but I don't want to start it and after a week find it's unreliable or unefficient. If anyone has experience in this then let me know Thanks.

SQL Server 2008 R2 installation error "Could not find the Database Engine startup handle."



I am unable to install SQL Server 2008 R2 Developer Edition (x86) on my Windows 2008 (32 bit) virtual machine. It fails everytime with "Could not find the Database Engine startup handle." error.

Any pointers?

plz find this error

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Error creating edit form for external list - Failed to find the default form for PAGETYPE PAGE_NEWFO


For the last few days we have been unable to create custom new/edit forms for External Lists in Sharepoint Designer.  When i try to create a form Sharepoint Designer show the message 'Could not save the list changes to the server'.  The corresponding message in the ULS log file is 'Failed to find the default form for PAGETYPE PAGE_NEWFORM'.  Does this mean i have somehow managed to break the form templates for External Lists?

I saw some other posts about the 'Could not save the list changes to the server' error and followed the suggested steps including removing all versions of the list and related content type, and recreatign htem but this didn't work.

Error 20026 - cannot find publication


I have restored a merge-replication database after a new install of SQL Server 2008 R2 and now synchronization is not working.  When I go to Publication Properties > Publication Access List, I get the error #20026 - The publication "bldatamaster" does not exist.  Yet the title of the dialog box itself is "Publication Properties - bldatamaster" I don't understand how I'm looking right at the properties of the publication bldatamaster, but the system is saying this publication does not exist.  I get the same message when I hit "View Synchronization Status" on a subscriber in the Replication tree on the object explorer.

I can see all the articles and all the subscriptions from when synchronization was working in our previous install (which was on the same server), but I cannot get it to work

I'm sure this is my error - I'm in way over my head here as our developers have vanished and we're down until I fix this.

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