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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Unique naming convention

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :C#

I've seen many posts on this topic. Unfortunately I haven't found a solution for a very specific naming convention that I'm hoping there is a solution for. Codeless perferably but either way. The naming convention is as such    H3-RFR-KED-MRC-1

The H3-RFR- is static. The "KED" & "MRC" are both pulled from 2 seperate drop down lists in the form which describe the path of a workflow. The "1" is the @ID, looked up from the sharepoint site. The issue I have is number increases sequentialy, regardlessof the path. Ideally I'd like the naming to follow as such . . .





Where each new 'path' combination would start at 1, but if the path is not unique the number increases by the max total of that combination +1. Is this at all possible? if so can someone point out where I can find that solution.

View Complete Post

More Related Resource Links

Windows Forms/Web Controls Naming Convention


Has Microsoft documented on the naming convention for windows and web controls like they did for Classes.


Can not figure out LDAP naming convention for AD Application Mode login

I am trying to configure Oracle Access Manager (OAM) with AD application mode (ADAM). I am being prompted for the administrator (root DN) LDAP login for the ADAM instance, and nothing I try works. I know the administrator account in ADAM, and when I installed ADAM I used this info for the partition information, CN=accessmanager, DC=devnet, DC=local , the local admin account is devadmin, which is in the administrators container. My question is, what should the LDAP naming convention I should use for devadmin ? Oracle's example is (cn=administrator,o=company,c=us), but nothing I tried seems to allow OAM to access the ADAM installation. The obvious CN=devadmin,DC=devnet,DC=local does not work. Thanks in advance, John  

Naming Convention for SSIS?


hi all,

what 's your naming convention when developing SSIS packages?


thanks in advance.

Andrew Chen
Interested in BI related technologies

Naming Convention in SSRS



I'm looking for a Naming Convention /Best Practicies  for the name of object generated in SSRS, such a TextBox, Group,... 

(E.g. TextBox1-->TextBoxAccount or tbx_Account or Table, tableXXTextBoxAccount ??)

Doest anyone have a intersting link or could suggest me any naming convention ?



Policy Management - Use of ExecuteSQL() for Index facet to define naming convention policy


I am trying to define an advanced policy involving use of executeSql() function and @@SchemaName, @@ObjectName parameters. It is related to non-clustered index naming convention and as such I am making use of 'Index' facet.  I have defined policies for tables and procedures and I have successfully used executesql with @@SchemaName and @@ObjectName parameters. However, when I run Index policy I get the following error;

TITLE: Microsoft SQL Server Management Studio

Exception encountered while executing policy 'CompanyName - Index - Naming Convention'.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1539+)&EvtSrc=PolicyEvaluationException&LinkId=20476


Must declare the scalar variable "@@SchemaName". (Microsoft SQL Server, Error: 137)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft&#

Unique content within master page based on conditions met


 Hi all-

I would like to present users with unique content based on certain conditions being met as they land on the home page (default.aspx).  The condition logic will be in the VB code behind Page Load event. The content will go in a content placeholder as specificed from the master page. 

However, the content change wouldn't be something small (ie making a panel or label visible or not) but rather it will be different HTML,  Divs and databound gridview content.  The HTML content will be stored in the database.

Can someone point me in the right direction for best practices on how to accomplish this?


Unique ID throughout entire request



I am hoping somene here could advise me on a better solution to my present problem.  First a little background information on the application. 

I have a web application using the 3.5 framework.  The structure of this application is as follows: UI -> WebService   -> Business Layer -> DataAccess Layer.   What I want to accomplish is for every request (click on a link or button) have a unique identifer that follows this request through its entire lifecycle.  This unique identifer can be accessible anywhere within this request.  We use Response.Redirects which could easily be changed to Server.Transfers (although I do not want to do that) but  the problem lies with the web service calls.  Currently, a GUID is set in the ApplicationRequest.  This GUID checks for a guid value in the RawURL and if so, assigns this value to a HttpContext Item.  If not, HttpContext.Items gets a new one created.  However, this idea is wrong and will need to be revisisted.  The bigger problem is with the web service calls.  Without changing every web service method signature, and every call for that matter, is there a way of getting this GUID there.  I created a web method in every web service so that each time I instantiate a web service object in the UI, before calling any

Unique text value in databse column


Hi Everyone!

I know this is probably a very basic question but how do I keep a column's text values unique in SQL server (ie for a unique username)?  The column is not an integer it's varchar(50), and it's not the primary key but I could make it the primary key if recommended.

The front end could handle it;  where the user would enter text, it's validated, then a query is done to see if that username is available.  If so, then user can decide to choose it and an insert is done, if not they pick a new username and process repeats.  With this approach, the responsibility of keeping the value unique solely rests on the front end, nothing on the database side.

Is this the correct way to handle this? 

Thank you!


Patterns in Practice: Convention Over Configuration


We look at some techniques you can adopt to reduce the amount of housekeeping code you write so you can focus on the essence of the application.

Jeremy Miller

MSDN Magazine February 2009

Basic Instincts: Naming and Building Assemblies in Visual Basic .NET


Learn what the different parts of an assembly name mean, how to create a stronly named assembly, and get other assembly security tips.

Ted Pattison

MSDN Magazine August 2003

Array List with unique id while adding student info

Hello Frds,

I'm having arraylist to add student info but i have to create unique id per record below is my class.

Student objStudent=new Student(123,"Nj");

public class Student
  private string name;
private int RollId;
public string Name

    get { return name; }
set { name = value; }

public int Id
    get { return RollId; }
set { RollId = value; }
public Employee(string name, int id)


reusable components and unique ids


I'm trying to create reusable "zones" but am having trouble figuring out how to give them all unique ids.

What I'd like is to be able to create a component which can be put on an mvc page using the usercontrol syntax or using RenderAction or RenderPartial.  I want to be able to update these components' content using ajax, so I need someway to reference them by id.  However, there is no mechanism in MVC that wraps anything in a div or something like that.

I've learned that if I extend ViewUserControl and put the controls on the page like so:

<Zones:TestControl runat="server" ID="TestControl1" />

Then I can use the 'ClientID' property to get the unique ID generated.  However, if I use RenderAction or RenderPartial in another request, obviously the control hierarchy is missing, so the ID is just 1.  So to get around this I made a simple base class like so:

public class BaseZone<TModel> : System.Web.Mvc.ViewUserControl<TModel>
        protected string zoneId;

        public string ZoneId
                string zoneId = ViewData["ZoneId"] as string;
                if (String.IsNullOrEmpty(zoneId))
                    return this.C

Problems creating a BDC file that use a unique select statment


I'm trying to build an BDC file that will pull information back from two tables in an Oracle database, I can import it without any errors, but then it tells me I do not have a filter when I try and select an item.  When I add a filter I get an error when I import the file.  The error I get is the following.
"Application definition import failed. The following error occurred: The IdentifierName Attribute of the TypeDescriptor named 'TestDate' of the Parameter named ':TestDate' of the Method named 'Get_TestTwelve_List' of the Entity named 'TestTwelve' does not match any of the defined Identifiers for the Entity. Error was encountered at or just before Line: '133' and Position: '16'."

Here is the section of

      <Property Name="RdbCommandText" Type="System.String"><![CDATA[

how to automatically save new file into document library with a unique name or ID?

I've created a form using MS Word Document (2007) and lock it (protect it) so that users will be able to fill in the required fields.
then i've created a Content Type and uploaded the MS word form to be used as a template.

Then I've created a document library and enabled the content type and associate the above form for the library, so that when users click on New button the form will open.

everythings goes fine till here.

The problem is when users clicks on New and save the file back to the library, It doesn't save it with a unique name, instead it is over writting the existing one.
in other words, if employee 1 fill up the form and save it and later on employee 2 accessed the library and fill up a new form, he will overwrite what employee 1 has already saved!!

Is there a way to give every new created file a unique name? maybe (username+time)??

How to remove the Controller postfix dependency in naming controllers?

In the  Controllers directory, naming every controller with "Controller" prefix seems plain stupid. Is there a way to remove this dependency?

CPU unique ID

Hi. I have written this simple maxscript to extract CPU ID. I want that to create a request code for evaluation process, so it must be a unique number in the world. -------- dotnet.loadAssembly @"System.Management.dll" mc = dotNetObject "System.Management.ManagementClass" "Win32_Processor" moc = dotNetClass "System.Management.ManagementObjectCollection" moc = mc.GetInstances() enumerator = moc.GetEnumerator() while enumerator.MoveNext() do ( mo = enumerator.current append CPUID ( mo.Properties.Item["ProcessorId"].value ) ) -------- Does system.management.managementClass involve a unique ID? Thanks for any help

Update with unique random generated values.

Hi there, I have an issue with an update of a column with unique random generated values, using SQL 2005. What I want to achieve is to create unique username for a list of let's say 1000 rows. My approach, which may be wrong, is as follows: to create a view to retrieve a random generated number of 7 digits; to use a function that retrieves the number from the view and checks if it is unique in the table or not (if it is, the number is returned, if it is not, a new one will be generated and so on); to update the table using that random generated number. The problem is that it does not work. It does not generate unique numbers, not all the times (you have to test by running the code few times). I suspect it is something with the update, but not sure how to solve it. Here are the steps to reproduce the problem. Create the table: CREATE TABLE [dbo].[TB_Temp]( [ID] [int] IDENTITY(1,1) NOT NULL, [ADM_USERNAME] [nvarchar](7) COLLATE Latin1_General_CI_AS NULL, ) ON [PRIMARY] Add some test rows: DECLARE @i INT SET @i = 0 WHILE @i <= 1000 BEGIN INSERT INTO TB_TEMP (ADM_USERNAME) VALUES ('') SET @i = @i +1 END Create the view to random generate 7 digits numbers: CREATE VIEW vw_RandNumberForAdminUserName AS SELECT ROUND((9999999 - 1000000 - 1) * RAND() + 1000000, 0) AS RandNumber Create the function to retrieve the unique 7 digits number: CREATE FUNCTION [dbo].[fn
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