Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...c# EditURLc# EditURL
Previous
 
Next
New Post
7/22/2007 11:07 PM
 

Hi,

I'm a fairly experienced module developer, and today i have come across the same problem.

My problem is exactly the same, trying to compile the website i get a error: The name 'EditURL' does not exist in the current context.

I too can see the EditUrl in my intellisense. I also have other public properties that i had made available to the ascx file. I'm trying to use this within a repeater (may or may not have something to do with the issue).

Had a quick look and saw this post. I played a round and came up with a quick solution. Try encapsulating the inherited EditUrl method, ie. create your own public method that passes your parameters through to EditUrl().

eg:

public string EditMyURL(string keyName, string keyValue)

{

return this.EditUrl(keyName, keyValue);

}

Now in the ascx file:

<%# EditMyURL("ItemId",DataBinder.Eval(Container.DataItem,"ItemId").ToString()) %>

I also had to add the ToString() method to the end of the last parameter to stop me getting a "cannot convert from 'object' to 'string'" compliation error.

I know its not the ultimate fix, but something to get you moving.

I'll try and find the solution, when time permits.

Hope it helps,
Dan

 

 
New Post
7/23/2007 8:12 AM
 

This problem is caused by something I consider to be a horrible feature in a modern language, specifically in C#.  Notice the specific error highlighted below

yole_79 wrote
My problem is exactly the same, trying to compile the website i get a error: The name 'EditURL' does not exist in the current context.

This is what Dan see's using intellisense

yole_79 wrote
I too can see the EditUrl in my intellisense. 

And his working code.

yole_79 wrote
public string EditMyURL(string keyName, string keyValue)

{

return this.EditUrl(keyName, keyValue);

}

The answer is that C# is a case sensitive language.  The compiler is absolutely correct that EditURL does not exist, but looking at Intellisense you see that EditUrl is spelled with a lowercase "rl".  Correct the casing in your ascx and you should be fine. 

This is an error that happens to me a lot and one of the many reasons that I don't care for Java or C#.  Trying to remember the exact spelling for some of these long variable and method names is hard enough, but throw in capitalization issues and the feature just overcomplicates things.  I would love to know what possible benfit there is to the user for having case sensitivity in a modern language. 


Joe Brinkman
DNN Corp.
 
New Post
7/25/2007 2:52 PM
 
Hi all,

Just wanted to thank everyone for their help. I made the change to my ASCX file and it worked...

Thanks,
Jen
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...c# EditURLc# EditURL


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out