Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search


Member Names Cannot Be The Same As Their Enclosing Type?

when i try to run an web application in visual studio 2008.. i got this error...

'PopupWindow': member names cannot be the same as their enclosing type

also while correcting errors my startup web page changed..dont know how to setback the original startup webpage...

public partial class PopupWindow {
/// <summary>
/// frmPopupWindow control.
/// </summary>[code].....

View 1 Replies (Posted: Aug 20 10 at 7:00)

Sponsored Links:

Related Forum Messages For ASP.NET category:
WCF / ASMX :: Member Names Cannot Be The Same As Their Enclosing Type
i'm trying to access the .net webservice in the C# project in VS2003, as soon as i set the refer to the asmx file and compile the project, it comes-up with an error mesage "member names cannot be the same as their enclosing type",,, but if i refer the same URL in it works fine...

but iterrors onlyinC#...

Posted: Jul 26, 2007 02:37 PM

View 4 Replies!   View Related
DataSource Controls :: The Null Value Cannot Be Assigned To A Member With Type System.Decimal Which Is A Non-nullable Value Type
I am making a website to store invoices so i can mail them to clients. So i got a table for clients, invoices and one with invoice products/services. When an invoice has no products/services added to them and it returns null i get the error "the null value cannot be assigned to a member with type System.Decimal which is a non-nullable value type."

I just started with linq. Before i always used mysql. Mostly i just had to call data from 1 table so forgive me if my linq query isn't really correct.

Dim invoices = From i In db.invoices _
Group Join p In db.products On Equals p.invoiceId Into invoiceProducts = Group _
Select New With {i.client.naam, i.titel, (From iP In invoiceProducts Select iP.prijs).Sum}

i show the client's name, the title of the invoice and the total amount the clients will need to pay for products and services.

Posted: Dec 22, 2010 01:08 PM

View 1 Replies!   View Related
Namespace Or Type Specified Doesn't Contain Public Member
I have created a ASP.NET 3.5 web application and in it I have SearchGridView.vb class file in the directory Old_App_Code.This file creates a namespace MyApp.WebControls, which is also referenced in web.config ina namespace tag, as well as included as an import directive at the beginning of my content page. Unfortunately, I receive the following error:Warning1Namespace or type specified in the project-level Imports 'MyApp.WebControls' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.Here's the first several lines of my class file SearchGridView.vb:


why this is happening, as well as possible fixes? I cannot impement the asp:SearchGridView due to this error.

Posted: Feb 15, 2010 06:54 AM

View 2 Replies!   View Related
ADO.NET :: Null Value Cannot Be Assigned To A Member With Type System?
I am getting an exceptionon a linq to sqlquery:The null value cannot be assigned to a member with type System.DateTime which is a non-nullable value type.


Posted: Dec 22, 2010 03:09 PM

View 3 Replies!   View Related
Security :: Type Is Not Resolved For Member... (membership Provider)
I created my own membership provider and membershipuser class. When i try go to the security tap in .net Configuration tool, i get following:

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem:
Type is not resolved for member 'SWEB.Membership.SWEBMembershipUser,SWEBMembershipProvider, Version=, Culture=neutral, PublicKeyToken=null'.

Posted: Dec 19, 2007 08:50 AM

View 7 Replies!   View Related
MVC :: The Null Value Cannot Be Assigned To A Member With Type System.Int32 Error
I got the following error when i tried to insert a new record after the run my project, so what does this error indicates?

"{"Cannot insert explicit value for identity column in table 'Articles' when IDENTITY_INSERT is set to OFF."} System.Exception {System.Data.SqlClient.SqlException}


Posted: Dec 26, 2010 02:27 AM

View 4 Replies!   View Related
Web Forms :: Unable To Access A Non-static Member Of Outer Type?
I am building a multi user site for reporting issues. I am using Session togive the User Name to the page after the log in but i keep getting this error!

Language="C#" %>
<! [code].....

Posted: Oct 16, 2009 11:09 AM

View 2 Replies!   View Related
Security :: Custom Identity / SerializationException: Type Is Not Resolved For Member
In my ASP.NET mvc app, I wrote my own custom IIdentity which I swap with the default FORMS identity. I do this usingApplication_PostAuthenticateRequest in Global.asax. This works for the most part as it gives me a more meaningful identity prior to invoking actions on my MVC controller. Unforunately, things fall apart after the controller call. Something in the ASP.NET framework is bound and determined to serialize my identity and blows up during this process. I even made my custom identity serializable but it still blows up.
Note, I can serialize / deserialize this class in a unit test using the binary formatter.

Here is the exception:

[SerializationException: Type is not resolved for member 'MvcTest.Models.SiteUser,MvcTest, Version=, Culture=neutral, PublicKeyToken=null'.] Microsoft.VisualStudio.WebHost.Server.GetProcessToken() +0 Microsoft.VisualStudio.WebHost.Host.GetProcessToken() [code].....

protected void Application_PostAuthenticateRequest(object sender, EventArgs args)

Posted: Sep 10, 2009 10:13 PM

View 2 Replies!   View Related
Web Forms :: Public Member 'Text' On Type 'String' Not Found?
This is driving me nuts. I'm trying to make a better search function for my database. I've had this working before but for the life of me I can't see where the problem is.

The error is: Public member 'Text' on type 'String' not found.


Posted: Sep 02, 2010 02:52 AM

View 4 Replies!   View Related
ADO.NET :: Error: 'StartsWith' Is Not A Member Of Type 'Edm.string' In The Currently Loaded Schemes
I have an EntityDataSource for a listview control. Based on the value of a query string, I want to be able to filter the data by the first letter of the last name. So what I need is something like this:

EntityDataSource1.Where = "it.LastName.StartsWith('A')"

but I'm getting an error: 'StartsWith' is not a member of type 'Edm.string' in the currently loaded schemes.

Posted: Mar 24, 2011 04:35 PM

View 2 Replies!   View Related
MVC :: The Null Value Cannot Be Assigned To A Member With Type System.Int32 Which Is A Non-nullable Value?
When i click on the page that represents a controller the following error was displayed:-

"The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type"

On this link of code

var articleapproval = articletyperepository.FindAllArticlesRequireMyApproval().ToList();
while the FindAllArticlesRequireMyApproval execute the following LINQ statement :-
var articleapproval= articletyperepository.FindAllArticlesRequireMyApproval().ToList();

where this methods calls the following LINQ statement:-

Posted: Dec 26, 2010 02:32 AM

View 2 Replies!   View Related
How To Fix Type Names Conflicts In Dynamic Data
We're working in a Dynamic Data project that will handle entities coming from two different namespaces: myModel.Abby and myModel.Ben.

whose classes are:


So myModel.Abby.Car and myModel.Ben.Car are homonym. when I try to register both ObjectContext's, an exception is thrown telling us that there are type name conflicts between the mentioned classes (although the types belong to different namespaces).

How can we overcome type-name conflicts, caused by repeated type names among different namespaces?

Posted: Mar 30 10 at 20:24

View 2 Replies!   View Related
Access Of Shared - Constant - Enum Member Or Nested Type Through An Instance
I got an error in line 9 which says, Warning1Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated.


Posted: Jan 07, 2009 04:11 PM

View 4 Replies!   View Related
ADO.NET :: The Null Value Cannot Be Assigned To A Member With Type System.Int32 Which Is A Non-nullable Valu...
My code:


If the value is null writes out that error.How to check if the value is null? And if the value is null, I want to store + 1

Posted: Nov 17, 2010 09:53 PM

View 1 Replies!   View Related
DataSource Controls :: The Null Value Cannot Be Assigned To A Member With Type System.Int32
I have a problem:-
After learning linq.
I thought about testing it..
I have a table with the following fields.
id[..primary key..increment]

I have a linq to sql classes named dataclasses.dbml

here is my query

Dim db As New DataClassesDataContext
Dim p As New testing With {.name = "ad", .title = "adi"}

Here is my error..It crashes on db.SubmitChanges()
With this error...

The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type.

Posted: Jun 04, 2008 04:12 PM

View 12 Replies!   View Related
AJAX :: Namespace Of Type Specified In The Imports 'AjaxControlToolkit Doesnt Contain Any Public Member?
my website comes from a .net 20 config and am now on 4.0

For this line: Imports AjaxControlToolkit
I get this error: "namespace of type specified in the Imports 'AjaxControlToolkit"

I could remove that line, were it not that it also says this line: Private _questions As CascadingDropDownNameValue
error: Type 'CascadingDropDownNameValue' is not defined.

My web.config has been upgraded, I have placed the latest ajaxcontroltoolkit.dll in my bin folder...what more can I do?

Posted: Sep 17, 2010 12:03 PM

View 1 Replies!   View Related
Forms Data Controls :: No Default Member Found For Type 'Integer'?
I'm trying toretrieve selectedDataKeyValue and I'm getting this error.


Posted: Aug 13, 2010 10:02 PM

View 2 Replies!   View Related
DataSource Controls :: The Null Value Cannot Be Assigned To A Member With Type System.Int32 Which Is A Non-nullable Value
I have an error while trying to join two tables using LINQ:

The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type.

The two tables are TableA (primary key field - A_pk) and TableB (primary key - B_pk). I need to pull all records (left join) from A with displaying to columns: A_pk and B_pk.

Now the problem is if B_pk is null, then I'm getting the error.

below is the code:[Code]....

Posted: Dec 08, 2009 09:28 AM

View 3 Replies!   View Related
Forms Data Controls :: GridView.DataKey Error: No Default Member Found For Type 'DBNull'?
I am binding SQL data to a GridView. The GridView's DataKeyNames property is set to the SQL column called "utID"

I know that within the SQL results, some of the utID values are NULL. After databinding to the GridView, I need to enumerate through the GridViewRows an read the DataKey values. However, when I try this I get the following error:

No default member found for type 'DBNull'. I am using the code below.

What object types are stored within DataKeys (I thought it was just integers or strings)

How to handle a NULL datakey value to prevent this error occurring?

I don't want to use Try Catch because it's too much of a 'hack'


Posted: Sep 16, 2010 04:11 PM

View 6 Replies!   View Related
Web Forms :: How To Sign A Potential Member On Member Role With Create User Wizard
I have two member roles at my project:
1.) Administrator
2.) Member

From the toolbox in Visual Studio 2008, I have dragged and dropped the create user wizard into the stage. I aim that a guest can register itself and automatically join the "member" role. Not the role "administrator". How can I do that?

Posted: Feb 25, 2010 10:03 PM

View 9 Replies!   View Related
MVC :: Create Member And A Member.Item. In One Page Dosen't Work?
WHen it goes to the post method, then the ITEM dosen't follow the member. and the ITEMS dosen't get saved. I debbug the informations and there are 0 Number items. Why dosen't it save Items also when I press the button.

Only The member item gets saved.


Posted: Jun 07, 2009 02:54 PM

View 1 Replies!   View Related
Web Forms :: Getting Warning "Type Of Member Is Not CLS-compliant" On One ASPX Page Only
I have a working web app that uses a web service which is compiled into its separate assembly. I have another class library project compiled as a separate assembly that serves as a proxy to this web service. This all seems to work at runtime but I am getting this warning at compile time which I don't understand and would like to fix:

I have dozens of webforms in the main project that reference the proxy class with no compile time complaints as this snippet shows:


And yet I have one webform (also in the root of the main project) which gives me the "not CLS-compliant" message but yet attempts to reference the proxy class just like the other ASPX files. I get the compile time warning on the line annoted by me with 'ERROR here..


This makes no sense to me. The file with the warning is called frmHome.aspx.vb; all others in the project declare things the same way and have no warning. BTW, the webservice itself returns standard datatypes: integer, string, and dataset.

Posted: Apr 14, 2010 06:22 PM

View 4 Replies!   View Related
MVC :: Model With List As Member: Member Always Null After Submit?
I have following model class:

public class WebModel
public List<ArticleModel> Articles { get; set; }
public class ArticleModel
public int ID { get; set; }
public double ValueParam { get; set; }

Then I have the controller with the two actions:

public ActionResult Index()
WebModel model = new WebModel();
ModelConverter.ConvertToModel(model, controller);
return View(model);
public ActionResult Index(WebModel model, string saveButton)
ModelValidation.ValidateWebModel(model, ModelState);
if (ModelState.IsValid)
return RedirectToAction("Create", "Article");
ModelConverter.ConvertToModel(model, controller);
return View(model);

And this is my view:

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Web.Models.WebModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<%var controller = Session["controller"] as Web.Code.SessionController; %>
<%Html.BeginForm(); %>
<table width="100%">
<%foreach (var article in Model.Articles)
<tr style="text-align: right">
<%:Html.DropDownListFor(m=>m.Articles.FirstOrDefault(f=>f.ID == article.ID).ID, new SelectList(controller.CurrentProdukt.Articles.AsEnumerable(), "ID", "Name", article.ID)) %>
<%:Html.TextBoxFor(m => m.Articles.FirstOrDefault(f => f.ID == article.ID).ValueParam)%>
<%} %>
<table style="width: 100%">
<input type="submit" name="saveButton" value="Save" />
<%Html.EndForm(); %>

If I press the submit button, I get to the second action method in the controller (the one with the HttpPost attribute). In this action, the object model itself is not null, but the "Articles" list inside is null.

Posted: Nov 25, 2010 01:38 PM

View 2 Replies!   View Related
DataSource Controls :: Take Names From The Table And Do Another Select Based On That List Of Names?
I have been working with this database for some time. Here is the situation...

I inherited a MS SQL database that has hundreds of tables with similar data. For instance:

FordTampa_customer is a table,

ChevyAtlanta_customer is a table, etc....

All of the columns are the same...justdifferenttables with their own ID field. All I have done...Inside of another database id is created a table called 'Customer' and added an 'Dealer ID' column along with the rest of the other columns in the other tables...

So the combination of the 'Dealer ID' and the 'ID' field are unique.....I know...its not the best way to do things...but I cannot change the old data structure because I cannot have access to it. I am give back-ups on a weekly basis, so this is all I have to work with.

All right, on to the real point of my post...

Currently, I have an application that I use to select all of the data from the 'Ford_customers','Chevy_customers',etc... and inserts them into my new main 'Customer' table. I do this by selecting the table names, bind it to an arraylist, loop through the list and execute an insert statement.

I do this in VB.NET, but I would prefer to do it in a Stored procedure of some kind....I just am not sure how to accomplish it. I use this syntax to get my list of tables:


I am not sure how to take those names from the table and do another select based on that list of names.

Posted: Jun 01, 2010 02:23 PM

View 1 Replies!   View Related
WCF / ASMX :: Data Type In Data Member?
is there something special with other data type beside string in the data contract? I have two properties with decimal and datatime datatype. Everytime I change the value (either in client side and server side), the changed value will not be reflected in the other end (say if the client changes the value then the service will not see the changes). However, everything works ok for string datatype.

Posted: May 05, 2010 04:22 AM

View 7 Replies!   View Related
How To Declare Variable In Enclosing Block
If ((intCustomerCount Mod intColumns = 0) And (intCustomerCount > intColumns)) Or (intCustomerCount = intColumns) Then

Posted: Jan 03, 2011 10:24 PM

View 3 Replies!   View Related
MVC :: Edit Form Field Enclosing Tag?
Is there a way to change the tags that enclose the fields, by default, from p to div on the edit forms?

for example, itchooses this by default:-


can I change the MVC framework so that it would create this, by default:-


Posted: Aug 23, 2009 11:30 AM

View 4 Replies!   View Related
AJAX :: FileUpload Control With Validation Not Work After Enclosing With UpdatePanel?
I have a FileUpload Control on the pagewith validation and it is working smoothly.

Laterthere is an important demand to have it partially updated so weenclose it withUpdatePanel.

Then problem comes up when user browse file and press upload button, no file is uploaded.

Is it we cannot do partial rendering with FileUploader ?

Posted: Nov 23, 2010 04:49 AM

View 3 Replies!   View Related
WCF / ASMX :: Prevent XML Web Service / SOAP From Enclosing Returned Data In CData[]?
I'm maintaining a legacy XML web service system (Framework 2.0), and is trying to return an XML fragment as part of a SOAP response. Problem is: SOAP will auto-enclose the XML fragment in <[CData[]]> tag, and I want to avoid this.

In short, SOAP Response gave me this:

<MessageContent xmlns=""><![CDATA[<DataSourceResponse>blah..blah..blah..</DataSourceResponse>]]></MessageContent>

But what I want in the SOAP response is this (without the CData enclosure):

<MessageContent xmlns=""><DataSourceResponse>blah..blah..blah..</DataSourceResponse></MessageContent>

Posted: Nov 18, 2010 05:55 AM

View 5 Replies!   View Related
Forms Data Controls :: How To Have Image Names From Database Point To Image File Names On Computer
using Microsoft SQL 2008, i have a table called "images" which has one column: "imageName". i'm supposed to use a repeater on an aspx page to go through the database table and display the images associated with each image name. the images are stored in a directory on my computer. So far the only thing i've been able to display are the file names (which i inserted into the database table before hand) I imagine heres a simple solution, but I haven't been able to discover one.

Posted: Oct 27, 2009 12:22 AM

View 3 Replies!   View Related
Create Member Section For Website And Non Member Section
I'm trying to create a member section for my website and a non member section. I want the nonmember pages to have access to all the member pages but just not certain features like saving to the database. Is there a way to have the same page for both members and non members but have certain controls like buttons and other things that are only usable to the member that is logged in?

Posted: Aug 29th, 2010, 04:43 PM

View 5 Replies!   View Related
BeginForm Is Not A Member Of 'Html' And Encode Is Not A Member Of HTML?
I'm working on this big project in MVC ASP.NET w VB.NETOne of my views is getting me headaches since a few and i'm not sure what's up.I've used the Begin.Form and Html.Encode methods alot in my other views and i never had any problems. Now this new Create.aspx view for one of my object called Automation is giving me multiple build errors such as those cited in the title plus

Error 184 'Context' is not a member of
BeginForm is not a member of 'Html'
Encode is not a member of HTML

My header is as follow (just like all of my other working views headers) :
<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage(Of XXXXX_XXXXX.Automatisation)" %>

Posted: Jan 26 at 14:17

View 4 Replies!   View Related
BC3016: Variable 'myConnection' Hides A Variable In An Enclosing Block?
I'm am not quite sure why I am getting this error.

Dim numUsers as Integer
Using myConnection as New System.Data.SqlClient.SqlConnection("Data Source=(local);InitialCatalog=dbtest;Integrated Security=True")
Dim queryString As String = "SELECT COUNT(*) AS Num_Of_User FROM tblusers WHERE username=@username AND password=@password"
Using myCommand as New System.Data.SqlClient.SqlCommand(queryString, myConnection)
myCommand.Parameters.AddWithValue("@username", requestName)
myCommand.Parameters.AddWithValue("@password", requestPass)
numUsers = myCommand.ExecuteScalar()
End Using
End Using

This error occurs on the first using statment.

Posted: Jul 16 10 at 20:34

View 1 Replies!   View Related
Variable Hides A Variable In An Enclosing Block Error
have a look at this simple code snippet


Here second declaration of x gives error that "variable 'x' hides a variable in an enclosing block. I wonder why this error is not given for second 'i' variable declared in second for loop?

Since i am declaring second x in a separate for block, why this error is given for variable secondx ?

Posted: May 14, 2010 12:16 PM

View 4 Replies!   View Related
Configuration :: MIME Type For .licx Extension/Error 53 Unable To Resolve Type ' <add Type="TabStrip" Version="7.0" />'...
I am not sure if I have found the right forum for this one.

the problem is:

I have a .licx file in my rootfolder.

I am getting the error:

Error53Unable to resolve type '<add type="TabStrip" version="7.0" />'C:inetpubwwwrootCrop_ApplicationCrop_Applicationeo_web.licx7Crop_Application

,which I get for all the types that are in the xml file(i just gave one of them).

A friend told me that I have to add the type .licx in the MIME type in the IIS .

The problem is that I find the MIME type, I add the extension type .licx but I do not know the MIME type for .licx

Posted: Nov 12, 2010 11:00 AM

View 1 Replies!   View Related
Forms Data Controls :: Conversion From Type 'TextBox' To Type 'String' Is Not Valid?
I have a FormView that allows a user to register for a company event. I want to do a couple of things with this form.

1. I need to write this data to a MS SQLdatabase

2. I need to send an email confirmation of their registration to their email.

I know how to doboth of these things, but i am having trouble doing both at the same time.

It would be nice if I could do it in one click, but I codedit into two pages to try to help simplify it.

The first page allows the user to input theirinformation into a formview and when they click the submit button, it places those answers into session variables:



The Second page confirms the users information by taking those session variables and placing them into labels:



However, after I place information into the formview on the first page, it throws up this error:

"Conversion from type 'TextBox' to type 'String' is not valid".

Posted: Sep 06, 2010 02:07 AM

View 3 Replies!   View Related
C# - How To Create A Generic/parent Type That You Could Send To Methods Without Having To Define An Overload For Each Type
I'm trying to create a validation layer that will contain methods to validate all my objects (in my Business Objects layer) .. but when I try to reference both the validation and business objects to each other I get a circular dependency error .. so I've decided to create a new layer (BLL) to validate the objects for me and I'll be able to reference both the validation and the object layers.

so I want to build some kind of class/interface -I don't know what fits more- to be like a generic type or a parent type that my method could accept it as a parameter and check for it's Name/ID property. Instead of defining a new method overload for each object type I have

Posted: Mar 5 at 18:43

View 1 Replies!   View Related
DataSource Controls :: The Given Value Of Type String From The Data Source Cannot Be Converted To Type Datetime
I have this error "The given value of type String from the data source cannot be converted to type datetime of the specified target column." when I used sqlbulkcopy to do the transaction

Here is my code:


Posted: May 19, 2010 07:35 AM

View 3 Replies!   View Related
Forms Data Controls :: Conversion From Type DBNull To Type Boolean Is Not Valid
I have a templatefield in my gridview that is binding to a boolean column, the column is null until we change it. The datasource is an SQLDataSource control.

I get the error Conversion from DBNull to type Boolean is not validwhen I try and load the page.

Is ther anything I can do other than changing all the boolean columns to false?


Posted: Nov 11, 2009 06:08 PM

View 1 Replies!   View Related
Copyright 2005-08, All rights reserved