The namespace '' already contains a definition for 'testSurvey'

I have a web user control  with a code behind file and this is the error I get...

below is the code behind file

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


   
public class testSurvey : System.Web.UI.UserControl <--ERROR HERE with 'testSurvey
{
    protected System.Web.UI.WebControls.Label Label1;
    protected System.Web.UI.WebControls.Label Label2;
    protected System.Web.UI.WebControls.RadioButtonList rblRating;
    protected System.Web.UI.WebControls.Button btnSubmit;
    protected System.Web.UI.WebControls.Panel pnlRating;
    protected System.Web.UI.WebControls.Label lblNumberofUsersRated;
    protected System.Web.UI.WebControls.Label lblAverageScore;
    protected System.Web.UI.WebControls.DataList datalistComments;
    protected System.Web.UI.WebControls.Panel pnlResults;
    protected System.Web.UI.WebControls.TextBox txtComments;

       
    private void DisplayResults()
    {
        testSurveyControler objController = new testSurveyControler();
           
        lblAverageScore.Text = objController.GetAverageScore(ModuleId).ToString();
        lblNumberofUsersRated.Text = objController.GetNumberOfRatings(ModuleId).ToString();
           
        datalistComments.DataSource = objController.GetArticleRating(ModuleId);
        datalistComments.DataBind();
    }
       
       
    private void Page_Load(object sender, System.EventArgs e)
    {
        if(!IsPostBack)
        {
            pnlRating.Visible = true;
        }

       
    }

    #region Web Form Designer generated code
    override protected void OnInit(EventArgs e)
    {
        //
        // CODEGEN: This call is required by the ASP.NET Web Form Designer.
        //
        InitializeComponent();
        base.OnInit(e);
    }
       
    /// <summary>
    ///        Required method for Designer support - do not modify
    ///        the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
        this.btnSubmit.Click += new System.EventHandler(this.Button1_Click);
        this.Load += new System.EventHandler(this.Page_Load);

    }
    #endregion

    private void Button1_Click(object sender, System.EventArgs e)
    {
        testSurveyControler objController2 = new testSurveyControler();
        objController2.AddArticleRating(ModuleId,Int32.Parse(rblRating.SelectedValue.ToString()),UserId,System.Web.HttpUtility.HtmlEncode(txtComments.Text.ToString()));

        pnlRating.Visible = false;
        pnlResults.Visible = true;
        DisplayResults();
    }

}

Acuall web user control page

<%@ Control Language="c#" AutoEventWireup="false" Codebehind="testSurvey.ascx.cs" Inherits="testSurvey" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%> Please rate this article





Ben
0
benny12345
5/10/2006 6:28:28 PM
asp.net.dotnetnuke-modules 4559 articles. 0 followers. Follow

1 Replies
1388 Views

Similar Articles

[PageSpeed] 51

To get this to work.  I deleted the <moduleName>.dll from the bin directory within the DOTNETNUKE\DesktopModules\<moduleName> and from the bin directory in the dotnetnuke root directory.  Then ran the <moduleName> within the dotnetnuke portal, instead of rebuilding it in VS.NET 2003.

I also used a nice little app that this guy wrote to help debug my user control a little
http://help.speerio.net/filemanagerpro/250/dnn/Resources/DNNDebug.aspx.htm

Ben
0
benny12345
5/10/2006 7:52:38 PM
Reply:

Similar Artilces:

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

'''''
Name: mario Email: ramar17atfastwebnetdotit Product: Gran Paradiso Alpha 2 Summary: ''''' Comments: K: Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2) Gecko/20070206 GranParadiso/3.0a2 ...

The namespace '<global namespace>' already contains a definition for 'xxxxx'
The namespace '<global namespace>' already contains a definition for 'xxxxx'  I am not sure why I am receiving the above error when I try to compile the website. My colleague can compile the same files fine without receiving this error. Can someone please help?Thanks!  check whether you have a copy of the file with different name but using the same class (duplicate file). In My case, i have a backup copy for a aspx file. Delete the file or exclude from the project will solve the problem. Thanks & RegardsJaiswar Vipin Kumar R.Mumbai - IndiaContact : +91 9...

The namespace '<global namespace>' already contains a definition for 'Map'
Hi all, I had encountered this error and I am not sure what is the reason behind. I have a few classes and all are having namespace Map. But when I compile, it give me this error. Can someone please help? Thanks  Are the classes you mentioned all in a folder called 'Map'? If so, try renaming the folder and see if that fixes the problem.Please mark helpful posts as "Answer" Hi Bslim67, Based on my understanding, there are a couple of classes which have the same namespace. When you compile your project, you get the error message above. If I have misunderstood y...

'do' won't 'do' if '/'
Greetings to All from Au, Have a NetWare Perl 5.8.4 and wanted to tweak File\Spec\NW.pm to try and standardise on '/' separators. If I run a test script (t/uni/lower.t) with an unmodified NW.pm, it calls t/uni/case.pl, that, in case.pl, (when the path separators are '\'), the $file is '..\lib\unicore\To\Lower.pl' and the following code portion works, with $simple getting a returned table: sub casetest { my ($base, $spec, $func) = @_; my $file = File::Spec->catfile(File::Spec->catdir(File::Spec->updir, "lib", &qu...

'''
Name: L Lachowsky Email: e2brutus_10atyahoodotcom Product: Firefox Summary: ''' Comments: why duddn this surprise me... I change default server from IE to Mozilla, and then i get error messages. well, shud I decide to not get on my computer with Mozilla..or shud I risk security breeches with IE....hmmm at least i can get on the internet with IE Browser Details: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this fee...

How to solve "The namespace 'Resources' already contains a definition for 'GlobalResources' " error?
Hi all, I added GlobalResources.resx file, and after that I added some new GlobalResources.en-UK.resx and GlobalResources.en-USA.resx in to the same App_GlobalResources folder. and when I run that, I got the following error. Anyone know how to solve that? Thanks in advance. The namespace 'Resources' already contains a definition for 'GlobalResources' c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\test\fd6f5dcd\3422fafa\App_GlobalResources.gzcj0ni8.1.cs 26  I have the same issue even though it's described on msdn h...

Cast from type ''''DBNull'''' to type ''''String'''' is not valid.
How do I avoid getting this error: Cast from type ''''DBNull'''' to type ''''String'''' is not valid. I am trying to get values from the database into a form for updating using a Datareader, SQL is set to allow nulls for certain fields as they are not required but the only way I can get the form to display is by adding a space in SQL. Is there another way around this? Check if it is equal to DBNull.Value first and if it is, don't do the cast.Stanley Tan theSpoke Blog Where in the code does it need to go? I am using the following and it's the profile that isn't always requi...

table_info('','','','%') cannot return any types
I was recently confirming table_info special cases and discovered the case for getting table_types cannot work. table_info('','','','%') should return a list of table types but it returns a list of empty strings instead: my @types = $h->tables('', '', '', '%'); print "all types:\n", join("xxx\n", @types), "\n"; # should output something like: # "dbo" # "INFORMATION_SCHEMA" # "sys" # and actually outputs: xxx xxx It seems to be down to the following ...

'_Master' does not contain a definition for 'Context'
 its first time happening to me. i have only one file in my asp.net website. the Master pagethis is the code behind class of this master pagenamespace Asif.Website{    public partial class _Master : System.Web.UI.MasterPage    {                    }}  when i publish this website it reports an error '_Master' does not contain a definition for 'Context' When i remove the "Namespace" and class is without namespace it works fin...

'double' does not contain a definition for 'Format'
I'm getting an error saying double does not contain a definition for "FORMAT" any ideas... <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Web.UI.HtmlControls" %> <%@ Import Namespace="System.Web.UI.HtmlControls" %> <script language="c#" runat="server"> void Calculate_Click(Object sender, EventArgs e) { int loanPrincipal = Convert.ToInt32(Request.Form["loanPrincipal"]); int loanTaxes = Convert.ToInt32(Request.Form["loanTaxes"]); int loanInsur...

'_Default' does not contain a definition for 'lblLogIn'
I have few lables in my page,when compile it gives error that _Default' does not contain a definition for 'lblAdminPath' .Though It run ok.part of codebehind code is as follow.Rest of the label work fine except few.All the tag in codebehind is closed.<asp:Content ID="DefaultContent" ContentPlaceHolderID="RDContentPlaceHolder" Runat="Server"> <table width="723" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff"> <tr> <table width="90...

CS0102: The type '_Default' already contains a definition for 'txtNome'
Hi friends, I did a webform with textboxes and I'm with the folowing problems:   textbox name: txtNome BEFORE: error: the "txtNome" does not exist in the current context Then I did put the code in the "code-behind":  "... protected System.Web.UI.WebControls.TextBox txtNome; ... " AFTER:  error: CS0102: The type '_Default' already contains a definition for 'txtNome' Please help me! Thanks Hi pablodarde, Your webform should have declarative code for the textbox that looks like line 1 or line 2: 1 <asp:TextBox ID="txtName" runat="server"></asp:TextBo...

'type' does not contain a definition for 'length'
Could anybody help me with this, thanks so much //Copyright (C) 2000 Microsoft Corporation. All rights reserved. // Hello1.cs public class Hello1 { int OneToZero(int[] args) { int iCount = 0; for (int i=0; i < args.length ; i++) { if (args[i] == 1) { iCount++; args[i] = 0; } } return iCount; } public static void Main(string[] args) { int[] iArr = {1, 3, 4, 5, 1, 1, 7}; Hello1 test = new Hello1(); int iNumOnes; System.Console.WriteLine("Values of the array: [ "); ...

Web resources about - The namespace '' already contains a definition for 'testSurvey' - asp.net.dotnetnuke-modules

Resources last updated: 1/22/2016 7:50:06 PM