In my view for my Editable Grid i'm getting errors about: "The name 'GridButtonTupe' does not exist in the current context" and "The type of namespace could not be found (are you missing a using directive or an assembly reference?)" I have included all reference files, do you know what may be the problem?
Without seeing the code, it seems that you need to be accessing 'GridButtonTupe' via FindControl("GridButtonTupe") in the code behind.
See this, for example: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx (take a look at the default.aspx.cs example)
A code example of the issue would be helpful if this is not the answer.
Related
I had perfectly well working blazor app (like in demo -- shared project, server project and client one). I needed to move entire solution and also rename the projects. As the effect I have strange errors in web client:
App.razor: warning RZ10012: Found markup element with unexpected name 'RedirectToLogin'. If this is intended to be a component, add a #using directive for its namespace.
Index.razor: warning RZ10012: Found markup element with unexpected name 'SurveyPrompt'. If this is intended to be a component, add a #using directive for its namespace.
App.razor: error CS0246: The type or namespace name 'MainLayout' could not be found (are you missing a using directive or an assembly reference?)
App.razor.g.cs: error CS1662: Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type
App.razor: error CS0246: The type or namespace name 'MainLayout' could not be found (are you missing a using directive or an assembly reference?)
Of course "MainLayout" is present, same story with "SurveyPrompt". I deleted entire "bin" directory, "obj", ".vs", restarted VS and build the solution again, same outcome.
One thing which confuses me even more is "RedirectToLogin" for example is a component. I have my own component, used on several of pages, and yet there is no warning about it, so it is seen. Why then "RedirectToLogin" is not?
The error coming from compiled razor file I guess is safe to ignore for a moment, because it can be caused by previous errors and warnings.
For the record, I have to rename the projects, so I cannot solve this by reverting all the name changes.
On every warning/error report against "MainLayout" or "RedirectToLogin", I edited given file and added entire namespace for it. Looking at their names "BlazorApp.Client.Shared.MainLayout" I realized somehow conflict with project namespaces could happen -- "BlazorApp.Client.Shared" is folder within client while "BlazorApp.Shared" is project.
On the other hand conflict could occur if there are two same entities within two distinct reachable namespaces. Namespaces are reachable, but "MainLayout" for example is only once defined.
Problem solved, pity I don't fully understand why it worked before and what was broken after renaming.
I've come across an issue in Umbraco where I was (once upon a time) able to use the Umbraco.Forms.Core.Enums namespace however, since I've checked my current code in and done a build ready for production, the compiler is failing to recognize it exists any more!
it's giving the standard error of
The type or namespace name 'Enums' does not exist in the namespace 'Umbraco.Forms.Core' (are you missing an assembly reference?)
Could anyone point me in the right direction with this? I've tried updating Umbraco.core, umbraco itself and searching in the namespace to try and find this Enums type but I just can't find it!
Thanks everyone :)
net...
I'm making a simple MVC project with the help of tutorial in given link:
http://www.codeproject.com/Articles/486161/Creating-a-simple-application-using-MVC
I'm getting error at this particular stage.
Now let’s apply validations on the fields:
Error 2 The type or namespace name 'DisplayName' could not be found (are you missing a using directive or an assembly reference?)
C:\Users\sword\Documents\Visual Studio 2012\Projects\MyCalculatorSrevice\MyMvc1\MyMvc1\Models\UserModels.cs
I searched for it, but couldn't find anything to remove this error.
help me out
thanx
Make sure :
You've referenced System.ComponentModel assembly
You have import the annotation by using System.ComponentModel; in your UserModel.cs file.
Hope it will help u,
you are actually missing reference to DataAnnotations. Try adding following line at among references, and it will start working.
using System.ComponentModel.DataAnnotations;
Here's the basic information:
I've been studying Rob Miles' C# Yellow Book 2011 extensively.
I'm on page 155 of 197 (mostly finished) and coming to the part about forms/guis.
I use Notepad++ and NppExec for quick compiling and easy editing (I just personally loathe VisualStudio... I don't like having things done for me.)
I'm using .NET 4.0's compiler
I've set up csc.rsp to include:
System.Windows.Forms.dll
System.Drawing.dll
System.Drawing.Design.dll
and the other required resource references.
I've double-checked all my references.
I include all required "using" statements in my code.
And the problem:
Every time I try to compile a piece of code which makes use of any form methods I get this error:
error CS0234: The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)
I've looked everywhere. What can I do to resolve this issue?
PS - if you really want or need to see the code, I can paste it in a response. I won't do it unless someone asks because it's kinda long.
If it can't find Windows under System, then your reference to System.Windows.Forms.dll isn't working. You don't show exactly how you are doing that, but: that is the problem. So: however you are using csc.rsp, it isn't working. Are you perhaps using /noconfig? Have you edited the right file? Did you edit it as an admin user? If you open csc.rsp in an editor, are your changed there?
Afternoon all,
I really need your help as this is a Nightmare!
I was earlier having a problem with referencing a 3rd Party Dll (Here) but have overcome this problem and am now having a problem referencing my own classes!
Everything seems fine at build with no errors at all but when I go to run the application it comes up with the following Compilation Error:
Compiler Error Message: CS0234: The type or namespace name 'Secure' does not exist in the namespace 'source_extranet' (are you missing an assembly reference?)
The line that the Error points to this line in the class:
source_extranet.Secure.BackendCustomData newdata =
new source_extranet.Secure.BackendCustomData();
This line of code points to a class in the same folder as the calling code class.
I have scoured Google looking for an answer and haven't found anything that points me to an answer to my problem.
Any help would be AMAZING!
Check that your class Secure also uses the source_extranet namespace. And if its a partial class make sure the partials also have the right namespace.
This has all been going wrong because a colleague was attempting to add in additional functionality and was clearly very unsuccessful!
Upon reverting his changes it is now working perfectly.