.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson
Post New Web Links


Posted By:      Posted Date: October 14, 2010    Points: 0   Category :ASP.Net

Hello.  I am beginning the process of converting a MS Access application over to ASP.NET.  And I am green at ASP.NET.  This Access application has been around for close to 15 years with constant enhancements, updates, additions, and so on.  Even today it is still evolving at 30mgs in size (just the front end).  The back end tables are on sql server 2005.  Anyway, enough of that.  I my starting to go over it, I have come across some modules that have numerous Global Const in them.  I am finding that a module for PORoutines has all the Purchase Orders constants, ECORoutines has all the ECO (stands for Engineering Change Orders) constants, and so on. 

Using VS2010 with C# as the code behind.  Placeing this in a webapplication. 

So, my question(s);

1)  can all of these Global Const in all of the modules be combined into 1 module in ASP.NET?  Something like CommonConstants.cs?  

2)  if so where is the best place to put the module?   

3)  would the Global Const be replaced with Public Const?

If anyone has any other thoughts, suggestions, samples/examples, or links regarding this, I am open and willing to learn all I can.  Luckily, there has not

View Complete Post

More Related Resource Links

Passing constants to workflow from a form

I have one workflow which I want to trigger from multiple custom forms against the same list. I want to pass constant values to the workflow depending on which custom form is used. I know that I can add values to my list and include them as hidden fields on the form but I'd like to know if there is a way to do this without having the constant values as fields in my list? The constants are only needed during the workflow execution on submission. For example I want to process workflow based on a constant called "project" with value "project x" but I don't want to store the value "project x" in my list. I just want workflow to be able to branch on this value. Thanks for any help.  

How can use A resource file to Store Page name constants


How can i use the .net Default folder App_GlobalResources Folder to store a Resource file which contains all the Page names?

Currently i added a a Resource file (PageNameConstants.resx) and set the name filed and Value field but i cannot access any of those by calling

App_GlobalResources.PageNameConstants.HOME(HOME has the value ~/Home.aspx)

Please help

Exposing Constants through Services[WCF]


Hi, can any one tell me how I can expose constants from server to client.

I need the string constants to be used both on server and client.

Please be informed that I have many constants that are to be consumed by the client and so I feel using OperationContract is not feasible.

I tried the following but no luck,

public class Customer
 public string Id="Customer Id";


//The following is used in OperationContract so automatically exposed
public class Customer
 public string Id
       return "Customer Id";

I know I can also do the following, but looking for a better solution

[ServiceBehavior(InstanceContextMode= InstanceContextMode.Single)]
public class CustomerService:ICustomerService // ICustomerService being ServiceContract
  public Cu
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend