Hi EmadKhan,
You need to define static variable and set the values to it.
ColumnCodes
C#
using System;
/// <summary>
/// Summary description for ColumnCodes
/// </summary>
public static class ColumnCodes
{
public static string EstimatedDelivery = "ED";
public static string ActualDelivery = "AD";
}
VB.Net
Imports System
Public Class ColumnCodes
Public Shared EstimatedDelivery As String = "ED"
Public Shared ActualDelivery As String = "AD"
End Class
Then using the Class name access the values.
C#
protected void Page_Load(object sender, EventArgs e)
{
var ed = ColumnCodes.EstimatedDelivery;
ClientScript.RegisterClientScriptBlock(this.GetType(), "", "alert('" + ed + "')", true);
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ed = ColumnCodes.EstimatedDelivery
ClientScript.RegisterClientScriptBlock(Me.GetType(), "", "alert('" & ed & "')", True)
End Sub