Accessing BLL With ObjectDataSource - Could Not Find A Non-generic Method?

Nov 25, 2010

I'm a starting C# programmer and I'm experiencing the following problem.I've created a dataset in Visual Studio With a table for persons making use of two table adapters, one for selecting all persons and one for selecting one person at a time filtered by the personID (Guid). This is a seperate project of my solution. After that I created a new project for the Business Logic Layer

private PersonenTableAdapter personenAdapter = null;
protected PersonenTableAdapter Adapter
{get....}
[System.ComponentModel.DataObjectMethodAttribute (System.ComponentModel.DataObjectMethodType.Select, true)]
public DAL.Testdatabase.PersonenDataTable GetPersonen()
{...}
[System.ComponentModel.DataObjectMethodAttribute (System.ComponentModel.DataObjectMethodType.Select, false)]
public DAL.Testdatabase.PersonenDataTable GetPersonenByID(Guid ID)
{...}
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
public bool updatePersoon(string Voornaam, string Achternaam, string Geslacht, string Adres, string Huisnr, string Postcode, string Plaats, string Telnr, string GSM, string BSN, DateTime? CreateDate, string CreatedBy, DateTime? LastModifiedDate, string LastModifiedBy, bool? Actief, DateTime? DatumInactief, Guid ID)
{...}
When issueing the Update method using a detailsview with an Objectdatasource i get the following error.
ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'updatePersoon' that has parameters: Voornaam, Achternaam, Geslacht, Adres, HuisNr, Postcode, Plaats, Telnr, GSM, BSN, CreateDate, CreatedBy, LastModifiedDate, LastModifiedBy, Actief, DatumInactief, original_ID.

View 1 Replies


Similar Messages:

C# - ObjectDataSource Could Not Find A Non-generic Method?

Dec 20, 2010

I have this ASP.NET code:

<asp:DropDownList
ID="ddlBrokers"
runat="server"
AutoPostBack="true"
DataSourceID="srcBrokers"
DataTextField="broker"
DataValueField="brokerId"
/>
<asp:ObjectDataSource
id="srcBrokers"
TypeName="DatabaseComponent.DBUtil"
SelectMethod="GetBrokers"
runat="server">
</asp:ObjectDataSource>

My DAL code:

public DataTable GetBrokers(bool? hasImport=null)
{
SqlCommand cmd = new SqlCommand("usp_GetBrokers");
if (hasImport.HasValue)
cmd.Parameters.AddWithValue("@hasImport", hasImport);
return FillDataTable(cmd, "brokers");
}

When the form loads I get this error:

ObjectDataSource 'srcBrokers' could not find a non-generic method 'GetBrokers' that has no parameters.

Is it my optional parameter that is causing the problem? How can I workaround this? Is it possible to have optional parameters with declarative ASP.NET code?

View 1 Replies

C# - Error - Objectdatasource Could Not Find A Non-generic Method

Mar 7, 2011

I am binding dropdown list using Object data source. I got an error like this

"ObjectDataSource 'objDSStatus' could not find a non-generic method 'GetIssueAllowedStatusByCategoryIDStatusIDandUserType' that has parameters: IssueCategoryID."

My code is as follows .aspx

< asp:DropDownList ID="ddlStatus" runat="server" DataSourceID="objDSStatus"
DataTextField="IssueStatusName" DataValueField="IssueStatusID">
< /asp:DropDownList>
< asp:ObjectDataSource ID="objDSStatus" runat="server" TypeName="DA"></asp:ObjectDataSource>
.cs
private void Bind(int IssueCategoryID, int IssueStatusID, int UserType)
{
ddlStatus.Items.Clear();
objDSStatus.SelectMethod = "GetIssueAllowedStatusByCategoryIDStatusIDandUserType";
objDSStatus.SelectParameters.Clear();
objDSStatus.SelectParameters.Add("IssueCategoryID", IssueCategoryID.ToString());
objDSStatus.SelectParameters.Add("IssueStatusID", IssueStatusID.ToString());
objDSStatus.SelectParameters.Add("UserType", UserType.ToString());
objDSStatus.DataBind();
ddlStatus.DataBind();
}
DA.cs
public List<IssueStatus> GetIssueAllowedStatusByCategoryIDStatusIDandUserType(int IssueeCategoryID, int IssueStatusID, int UserType)
{
List<IssueStatus> issueStatusList = new List<IssueStatus>();
}

View 2 Replies

ObjectDataSource 'ObjectDataSource1' Could Not Find A Non-generic Method MethodName?

Feb 3, 2010

I am getting error : ObjectDataSource 'ObjectDataSource1' could not find a non-generic method What would be the possible cause / solution for this error.This error is coming when call below method ObjectDataSource1.SelectMethod = "MethodName"// thr r some more code after that, although not much irrelevant
en call Server.Transfer("NewPage.aspx", True);

View 2 Replies

DataSource Controls :: ObjectDataSource Could Not Find A Non - Generic Method Update?

Mar 11, 2010

error "ObjectDataSource 'ObjectDataSourceCaseDetails' could not find a non-generic method". I have an update method and my ObjectDataSource is hooked up to the method in my BLL. review my code below

[Code]....

[Code]....

View 1 Replies

DataSource Controls :: ObjectDataSource 'odsDetail' Could Not Find A Non-generic Method 'Update'...

Jan 26, 2011

I try to update the detailview control. got this error messsage.

ObjectDataSource 'odsDetail' could not find a non-generic method 'Update' that has parameters: hospitalID, hospitalName, taxID, address1, address2, city, state, zip.

[Code]....

here's my edit function

[Code]....

View 3 Replies

DataSource Controls :: Objectdatasource With A Generic Select Method - How To Pass The Type

Mar 14, 2011

[Code]....

[Code]....

The GetList method is as folllowing:

[Code]....

Now i can populate my gridview trough code by this: //gvwDiensten.DataSource = new BindingList<diensten>(dataManager.GetList<diensten>().ToList());But i would like to use an objectdatasource, so i created this:

[Code]....

</asp:ObjectDataSource>

But when running the page i get:

ObjectDataSource 'dsDiensten' could not find a non-generic method 'GetList' that has no parameters.

View 5 Replies

ADO.NET :: Couldn't Find Non Generic Method 'DeleteProduct'

Sep 24, 2010

Code:

<asp:GridView ID="ProductsGrid" runat="server" AutoGenerateColumns="False" DataKeyNames="ID,UserId"
DataSourceID="ProductsOptimisticConcurrencyDataSource"
OnRowUpdated="ProductsGrid_RowUpdated" AllowPaging="True" AllowSorting="True"
EnableModelValidation="True">
<Columns>
<asp:CommandField ShowDeleteButton="True" ValidationGroup="InsertValidationControls" />
<asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID"
ReadOnly="True" InsertVisible="False" />
<asp:BoundField DataField="UserId" HeaderText="UserId" ReadOnly="True"
SortExpression="UserId" />
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ProductsOptimisticConcurrencyDataSource" runat="server"
ConflictDetection="CompareAllValues"
SelectMethod="GetZaposleniBy" TypeName="zaposleni"
OnDeleted="ProductsOptimisticConcurrencyDataSource_Deleted"
OnUpdated="ProductsOptimisticConcurrencyDataSource_Updated"
onselecting="ProductsOptimisticConcurrencyDataSource_Selecting"
DeleteMethod="DeleteProduct">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
</asp:ObjectDataSource>
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
public bool DeleteProduct(int ID)
{
Guid UserId = Guid.NewGuid();
int rowsAffected = Adapter.Delete(ID,UserId);
// Return true if precisely one row was deleted, otherwise false
return rowsAffected == 1;
}

The problem is when I use Guid UserId = Guid.NewGuid ();.

In Table I UserId type: unique Therefore it does not work. If I use the UserId type: int working.

Error:
ObjectDataSource 'ProductsOptimisticConcurrencyDataSource' could not find a non-generic method 'DeleteProduct' that has parameters: ID, UserId.

Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: ObjectDataSource 'ProductsOptimisticConcurrencyDataSource' could not find a non-generic method 'DeleteProduct' that has parameters: ID, UserId.

Source Error:
[Code]....

Stack Trace:
[Code]....

[InvalidOperationException: ObjectDataSource 'ProductsOptimisticConcurrencyDataSource' could not find a non-generic method 'DeleteProduct' that has parameters: ID, UserId.]
System.Web.UI.WebControls.ObjectDataSourceView.GetResolvedMethodData(Type type, String methodName, IDictionary allParameters, DataSourceOperation operation) +1119426
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteDelete(IDictionary keys, IDictionary oldValues) +504
System.Web.UI.DataSourceView.Delete(IDictionary keys, IDictionary oldValues, DataSourceViewOperationCallback callback) +89
System.Web.UI.WebControls.GridView.HandleDelete(GridViewRow row, Int32 rowIndex) +714
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +869
System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +207
System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565a

View 2 Replies

Forms Data Controls :: ObjectDataScource Not Working / ObjectDataSource1' Could Not Find A Non-generic Method?

Jan 8, 2010

Most likely the later, I think. In my page I have a GridView, DatailsView, and the ODS. None of my commands work. For the Udate command I get a an error "ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateVirtual' that has parameters: name, notes, active, original_ident." For the Delete command I get "ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'DeleteVirtual' that has parameters: ident, original_ident." Yet the Insert command in the DetailsView works fine. Originally I've copied a file that performs virtually identical task, the only difference is a different database and the Select command. I had the Delete command working for for while but that one too broke. Can someone point out what I'm doing wring?

Below is the code:

The *.aspx file:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="Maintain_Virtual_Users.aspx.cs" Inherits="Maintain_Virtual_Users" Title="Maintain Accounts" StylesheetTheme="Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h2>
Maintain Virtual Users</h2>
<p>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" DataKeyNames="ident"
DataSourceID="ObjectDataSource1" AutoGenerateDeleteButton="false"
AutoGenerateEditButton="False">
<Columns>
<asp:BoundField DataField="ident" HeaderText="ident" SortExpression="ident"
ReadOnly="True" />
<asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
<asp:BoundField DataField="notes" HeaderText="notes" SortExpression="notes" />
<asp:CheckBoxField DataField="active" HeaderText="active"
SortExpression="active" />
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
</Columns>
</asp:GridView>
</p>
<p>
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="ident"
DataSourceID="ObjectDataSource1" Height="50px" Width="393px"
DefaultMode="Insert" AutoGenerateInsertButton="False">
<Fields>
<asp:BoundField DataField="ident" HeaderText="ident" ControlStyle-Width="250"
SortExpression="ident" ReadOnly="True" >
</asp:BoundField>
<asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
<asp:BoundField DataField="notes" HeaderText="notes" SortExpression="notes" />
<asp:CheckBoxField DataField="active" HeaderText="active"
SortExpression="active" />
<asp:CommandField ShowInsertButton="True" />
</Fields>
</asp:DetailsView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DeleteMethod="DeleteVirtual" InsertMethod="AddVirtual"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetVirtual"
TypeName="VirtualPeopleBLL" UpdateMethod="UpdateVirtual">
<DeleteParameters>
<asp:Parameter Name="ident" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ident" Type="Int32" />
<asp:Parameter Name="name" Type="String" />
<asp:Parameter Name="notes" Type="String" />
<asp:Parameter Name="active" Type="Boolean" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ident" Type="Int32" />
<asp:Parameter Name="name" Type="String" />
<asp:Parameter Name="notes" Type="String" />
<asp:Parameter Name="active" Type="Boolean" />
</InsertParameters>
</asp:ObjectDataSource>
</p>
</asp:Content>
the .BLL:
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using dsVirtualPeopleTableAdapters;
[System.ComponentModel.DataObject]
public class VirtualPeopleBLL
{
private VirtualPeopleTableAdapter _virtualPeopleAdapter = null;
protected VirtualPeopleTableAdapter Adapter
{
get
{
if (_virtualPeopleAdapter == null)
_virtualPeopleAdapter = new VirtualPeopleTableAdapter();
return _virtualPeopleAdapter;
}

View 2 Replies

DataSource Controls :: ObjectDataSource - Update Method To Pass Entity To The Method In BLL Class?

Oct 18, 2010

I have an ObjectDataSource that I want to perform updates using a business entity i.e. Type="Object"). Since the values for the entity are within a user control, I have stored a reference to the control in Session and in the updating event, set the new instance to the value of the entity from the user contol property (which also pulls values from the form viaother properties of the control):

Protected Sub MasterDataSource_Updating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs) Handles MasterDataSource.Updating
Dim entity As New Login()
Dim accountControl As AccountInfo = TryCast(Session("AccountCtrl"), AccountInfo)
entity = accountControl.Entity
e.InputParameters.Add("entity", entity)
End Sub

And here's the markup for the datasource:

<asp:ObjectDataSource ID="MasterDataSource" runat="server" EnableCaching="true" CacheDuration="10"
SelectMethod="SelectAll" UpdateMethod="Update" TypeName="Data.DAL.LoginDAL">
</asp:ObjectDataSource>

My question is, how can I get the update method to pass this entity to the update method in my BLL class? It seems the Update method requires an ID or reference to the original object to use in determining whether any changes have taken place, but I don't really want to do this. In other words, I just want to use the Update event on my ObjectDataSource to pass my entity to the method ("Update") I set as a property and then let this business method handle the update of the data. Shown below, is the BLL update method I want to call:

Public Overloads Function Update(ByVal entity As Login)
If entity Is Nothing Then
Throw New ArgumentNullException("entity")
End If
MyBase.Update("UpdateLogin", entity.Username, entity.Password, entity.FirstName, entity.LastName, entity.Role, entity.Region, _
entity.Email, entity.Title, entity.TierID, entity.Street, entity.City, entity.State, entity.Zip, entity.Mobile, entity.Phone, entity.Fax)
End Function

When I try to call this as it stands now, I get an error: ObjectDataSource 'MasterDataSource' could not find a non-generic method 'Update' that has parameters: ID, entity. Previously, I'd set up a long list of parameters of basic data types (string, int, boolean), but this is rather cumbersome and I was hoping to use an entity for this (FYI, I also got the same type of error when I tried this approach, but with the ID as the
last parameter in the list). Perhaps what I'm doing here is atypical to how the ODS is normally used?? Has anyone done something like this successfully?

View 1 Replies

Forms Data Controls :: DetailsView Delete Method Passing Null Values To Objectdatasource Underlying Object Delete Method

Apr 12, 2010

I am using VS 2008 SP1. My also have included CSS Friendly adapter [URL] in my project ( I mentioned this because my GridView Empty data template is not showing when using GridView's CCS Friendly adapter). I have a GridView and a DetailsView. When a record in GridView is selected its details information is shown in the Details View. Type of Data source I am using is ObjectDataSource. My Insert and Update methods works perfectly. It is only the Delete method that is passing null values to the underlying object delete method. My source codes for both the UI, BLL, DAL is shown below

[Code]....

My Business Object code is below :

[Code]....

My Data Access Layer Code is:

[Code]....

View 2 Replies

Accessing An Object That Implements SelectMethod For ObjectDataSource?

Nov 8, 2010

Is it possible to access an object that is used by ObjectDataSource to retrieve records? For example,

<asp:ObjectDataSource ID="MyDS" runat="server"
SelectMethod="getUsers"
TypeName="DataSources.UserDS"
SelectCountMethod = "getUserNum"/>... </asp:ObjectDataSource>

UserDS class has getUsers that returns DataTable and getUserNum that returns int, this part works as it's supposed. But I wonder if can access the instance of UserDS somehow (not underlying DataTable)?

View 1 Replies

DataSource Controls :: Accessing The Data In The Objectdatasource?

Feb 14, 2010

I have a webpage that uses a formview. The formview gets the data from the objectdatasource which connects to a query in a table adapter.

I wanted to add a hyperlink in the page right below the formview that will "hyperlink" to another page passing parameters. Those parameters are values from the formview.

Can I just access the parameters of objectdatasource from outside the formview as follows?(it isn't working)?:

<asp:HyperLink
ID="HyperLink215"
NavigateUrl='<%# Eval("VIN", "Contact.aspx?Subject={0}") %>'
runat="server">Contact Us Regarding This Vehicle</asp:HyperLink>

If not, can I access those parameters in codebehind and do a redirect from there? How do I access the data of objectdatasource from codebehind? If I can do that, I could just put a button. Then in the button's click even, I could do the redirect.

View 4 Replies

State Management :: Setting Session Values In Generic Handler And Accessing Them From A Page?

Jun 10, 2010

I have a generic handler in which I fill up a Session variable. I implemented the IRequiresSessionState interface, so it shouldn't be a problem.

In a given page, I want to display that value, but it seems like the value is always empty. Is it because the session that is accessed and written to in the handler isn't the same one that is used on this page?

In the handler, I used context.Session["EID"] = "somevalue";

edit: i found out what the issue is but I do not know how to solve it. It's because I have this Java applet which reads out an eID, calls the handler to store the data, but the session used by the applet is not the same as the session used by the browser... so how could I exchange this data in a safe way?

View 1 Replies

How To Find Matching Values In A Generic List

May 25, 2010

I have anywhere from 5 to 10 generic list in an ASP.NET VB.NET web app. I would like to write a method to pass them all into, and return only the elements they all have in common.

View 2 Replies

DetailsView_ModeChanged Method Does Not Find Controls In A Certain Mode Using FindCotrol Method

Dec 4, 2010

I have a DetailsView control about a store products.

When I hit the "Edit" button of the DetailsView control, I want to bind a DropDownList to list products categories and select the current product category in it.

I used the method "ModeChanged" to select the current product category like this:

[Code]....

the FindControl method DOES NOT find the "ddlCategory" (returns null) although it's present in the EditTemplateField.

I'm thinking to use "DropDownList's PreRender" event for doing the purpose I aim, but I want to know what is wrong!

View 1 Replies

C# ASP.NET Binding Controls Via Generic Method?

Apr 30, 2010

I have a few web applications that I maintain and I find myself very often writing the same block of code over and over again to bind a GridView to a data source. I'm trying to create a Generic method to handle data binding but I'm having trouble getting it to work with Repeaters and DataLists.

Here is the Generic method I have so far:

[code]....

That way I can just define my CommandText then make a call to "BindControls(myGridView, cmd)" instead of retyping this same basic block of code every time I need to bind a grid.

The problem is, this doesn't work with Repeaters or DataLists. Each of these controls inherit their respective "DataSource" and "DataBind" methods from different classes. Someone on another forum that I implement an interface, but I'm not sure how to make that work either.

The GridView, Datalist and Repeater get their respective "DataBind" methods from BaseDataBoundControl, BaseDataList, and Repeater classes. How would I go about creating a single interface to tie them all together? Or am I better off just using 3 overloads for this method?

View 2 Replies

ObjectDataSource Cannot Find ProductsBLL Class

Jul 28, 2010

ObjectDataSource cannot find ProductsBLL Class(with "show only data component" unchecked)?ProductsBLL.cs is located at the root of the project.

View 1 Replies

MVC :: Generic List With Default Value As Method Parameter?

Jun 1, 2010

In one of the methods I'm using in my MVC app, there's a param that accepts a list collection of strings. If I have a string parameter, I can give it a default value of an empty string, but I cannot seem to give the list collection a default value of a new, empty list collection. I get the error that's beginning to seriously grate on my nerves about requiring a compile-time constant. getting the generic list to work with a default empty set?

View 5 Replies

ObjectDataSource Cannot Find Type When Deployed To SharePoint

May 1, 2010

I'm receiving the following error when deploying a feature containing ASP.NET pages to our development SharePoint servers: System.InvalidOperationException: The type specified in the TypeName property of ObjectDataSource 'odsYears' could not be found. Our .dll is being deployed to the GAC and our pages are being deployed to the the respective Features directory in the 12 hive. We are not receiving this error on our Sandbox SharePoint server. I disassembled the .dll to be sure the class was being deployed and everything looked ok. why this would not work on one of our SharePoint environments?

View 2 Replies

DataSource Controls :: BLL Add Method & ObjectDataSource?

Jan 4, 2011

My Business Logic Layer has AddItem method that add's to Items table in db along with an entry in Balance table.AddItem method uses two TableAdapters Items & Balance. Both these have corresponding Business Objects as Item and Balance.

Here is the AddItem method :

[Code]....

ASPX Page with DetailsView & ObjectDataSource

[Code]....

Now executing this page generates error as

ObjectDataSource 'ObjectDataSource2' could not find a non-generic method 'AddItem' that has parameters: _item, _balance, ItemName, GroupId, CategoryId, AuId, Rate, TotalStrScale, OffsStrScale, OffsAE [code]...

View 1 Replies

ObjectDataSource Does Not Call SelectCount Method?

Feb 22, 2010

I want to implement simple DataGrid and ObjectDataSource bundle with paging

my .aspx file

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

[Code]....

for some reason asp.net cals SelectMethod2 with (0,0,"") parameters and does not call GetCount.

View 1 Replies

Web Forms :: How To Find A Generic User Control That Checks For Silverlight

Apr 29, 2010

Is there a generic control that can be added to all aspx pages that checks for silverlight plugin and the version.. I know there is javascript and the silverlighthost object tag that accomplishes this. Is there an existing ascx control that wraps this functionality ? I need to be able to set the path to the xap on each page (via a property on the ascx control).

View 2 Replies

MVC :: Method Not Found: 'System.Collections.Generic.IDictionary`2

Mar 10, 2010

I dont know what I have done but my add blog or news item functionality is broken. It works fine locally but not on the server (.net 3.5 mvc 2 I believe).

[Code]....

The interesting thing is the path P:Web_DevelopmentAHNDEVControllersAdministratorController.vb. This is my local path on my machine but not the

View 16 Replies

C# - ListBox Is Null In Select Method Of ObjectDataSource?

Jan 14, 2010

I couldn't come up with a good subject. I have a simple ASP.NET 3.5 form. If you follow the numbered comments, I explain how I am stepping through the code when I run the page in debug mode. Both of the below functions are methods declared in the code behind file of the page, both are in the same _Default class. The ManagersListBox is declared in the Default.aspx page. Why is it that in the context of the GetSubordinates, the ManagersListBox is null? It's as if it disappears for a moment and then reappears after returning from the GetSubordinates method. Obviously the solution is to parameterize GetSuborindates, but that is not my concern. I am trying to learn how ASP.NET works and I would really like to understand why I am seeing this behavior "disappearing object".

[Code]....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved