I’m not really a ASP.NET programmer, but i am learning.
Here’s my question. IF you had a set of code that was written in ASP.NET 2.0 and used a specific namespace and used @Import command in the header of your page, BUT you did not have any of the code that defined the namespace, how would approach building a development server that would use this namespace?
What page would you define the namespace ?
How would you specify the value the a variable contained in this namespace?
I have some templates but they use a specific namespace. I want to setup this same namespace on my server so i can preview the code.
I’ve downloaded and installed the Visual Studio Express 2010 tool (great free app). Its helpful, but I am a little confused.
Trying to put the pieces of the puzzle together. Thanks in advance for any suggestions you have.
By type you mean “string”, “int” etc. right? I think in this case var1 is an int.
What are the possible things it could be? I think its a class, but I don’t know.
Agreed. How would i write a method that would specify the values of all of the variables in my page like “var1” for example and then be able to have the values outputted on my page. Of course, doing all of this would just simply allow the ASPX pages to run without displaying any errors because its missing.
Where would i specify “var var1 = myVars.getMyVars(“var1”);”? Does that just initiate the variable making it ready to receive a value? After that would i put something something public string var1 = “9.99”; ???
Could be a namespace or a class by the looks of it.
Not sure what ur asking
That initiates var1 with the value and return type of the method. Once it is of one type, you cannot make it another.
That is basic syntax rules. I think it would be best to take a step back and do a little learning of C#. Also, this assembly must have some sort of documentation, as it is very hard for us to help without knowing what is in it. And what the methods are and what they return and what you want to do with them.
You declare a var like this:
int i = 0;
string s = “string”;
etc
But you cannot say string i = “0” aftwards as i is already declared as an int.
IF there is no code-behind page used, then where do you think they would be defining the namespace?
I think there is some global page that effects all sites on the server.
This is where i am lost.
My question i have are as follows:
How do i define the variable “var1” that is contained in the ijwebsites.apps.webdev.mycfmx.class namespace?
What is myVars? Is it a class?
What is getMyVars? Is that a class and can you have a class inside of another class?
I’m using Visual Studio Express 2010. I don’t have VS 2010. I think i should be able to succeed in making a template that writes out all of these values. I just need a little help in the proper syntax to use to define the variables. I’ve inherited the code and i want to get this running so i can view the pages on our server.