I have something like this:
-
C:\Users\%USER%\Desktop\MyProject (includes a solution file) \Sample (includes a project file)
-
C:\Users\%USER%\Desktop\MyProject (includes a solution file) \Sample\src (includes Request.cs file)\web (includes web page stuff)
- folder ‘web’ contents:
- Default.aspx
- Default.aspx.cs
Lets say I have a String sayHello = “Hello”; in Request.cs file.
How could I “take” that string to my web page (into Default.aspx.cs file)?
regards,
user1223227
Hi user1223227 (stop me if I’m getting too personal).
If you mean how to reuse code between projects or solutions, then you want to create a Class Library project with the common code, and reference that project (or the assembly that the project produces) in both projects that require that code.
Alternatively, if you wish to reference the same physical source file in two or more projects, then you can add the file as a link.