Global .asax - AppConstant error

  • Thread starter Thread starter Zeba
  • Start date Start date
Z

Zeba

Hi,

I've been given an application that I have to deploy. But I'm getting
a compiler error that "The name 'UerRecruiting' does not exist in the
current context", when I try to access any page. My Global.asax
contains the following entry ..

<script runat="server">

void Application_Start(Object sender, EventArgs e) {
myRecruiting.AppConstants.CONN_STRING_RECRUITING =
ConfigurationManager.ConnectionStrings["connRecruiting"].ToString();

myGRIP.AppConstants.RESEARCH_CONNECTION_STRING =
ConfigurationManager.ConnectionStrings["connResearch"].ToString();
}
..
..
..
..
</script>

myGRIP is a namespace that, I think is part of a reference I have
included. It is not showing any errors. But myRecruiting the name of
this application itself. It is not used as a namespace anywhere. What
should I do to get rid of the error ?

Thanks !
 
If you are attempting to get the actual connection string, it would be:

ConfigurationManager.ConnectionStrings["connResearch"].ConnectionString;
Don't know about the constants part, that looks problematic (dynamically
setting a const = nope.
This is really an ASP.NET question and belongs in that group.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top