protected void CS_m_GetCloudServerDetails(string cslistserverid, string dcregion)
        {
            string value = "";

            try
            {
                if (string.IsNullOrEmpty((string)(Session["CSListServersID"])))
                {
                    if (string.IsNullOrEmpty(cslistserverid))
                    {
                        CS_m_ClearDdls();
                        CS_lbl_CSInfo.Text = "You currently have no servers built in the " + dcregion.ToString() + " datacenter.  Please create one to see more information about it.";
                    }
                    else
                    {
                        var serverdetails = Servers.serversProvider().GetDetails(cslistserverid, dcregion);
                        var volumedetails = Servers.blockStorageProvider().ListVolumes(dcregion);

                        var Status             = serverdetails.GetDetails().Status;
                        var TaskState          = serverdetails.GetDetails().TaskState;
                        var VMState            = serverdetails.GetDetails().VMState;
                        var UserID             = serverdetails.GetDetails().UserId;
                        var HostId             = serverdetails.GetDetails().HostId;
                        var ServerId           = serverdetails.GetDetails().Id;
                        var TenantId           = serverdetails.GetDetails().TenantId;
                        var Created            = serverdetails.GetDetails().Created;
                        var LastUpdated        = serverdetails.GetDetails().Updated;
                        var DiskConfig         = serverdetails.GetDetails().DiskConfig;
                        var FlavorID           = serverdetails.GetDetails().Flavor.Id;
                        var FlavorName         = serverdetails.GetDetails().Flavor.Name;
                        var ImageID            = serverdetails.GetDetails().Image.Id;
                        var ImageName          = serverdetails.GetDetails().Image.Name;
                        var PowerState         = serverdetails.GetDetails().PowerState;
                        var GetAttachedVolumes = serverdetails.GetVolumes().ToList();
                        var GetVolumeID        = volumedetails.ToList();

                        var listServerVolumeList = Servers.CS_m_ListServerVolumeList(dcregion);
                        foreach (var i in listServerVolumeList)
                        {
                            addItemToDdl(i);
                        }

                        bindlblCSInfo2(Servers.CS_m_ListAddresses(CS_ddl_ListServers.SelectedValue, dcregion));

                        foreach (var i in GetAttachedVolumes)
                        {
                            ListItem ListItemDisplayName = new ListItem(i.Device, i.Id);
                            CS_ddl_CBSAttachedVolume.Items.Add(ListItemDisplayName);
                        }

                        CS_lbl_CSInfo.Text = "Status : " + Status + "<br />" +
                                             "Task State : " + TaskState + "<br />" +
                                             "VM State : " + VMState + "<br />" +
                                             "User ID : " + UserID + "<br />" +
                                             "Host ID : " + HostId + "<br />" +
                                             "Server ID : " + ServerId + "<br />" +
                                             "Tenant ID : " + TenantId + "<br />" +
                                             "Created: " + Created + "<br />" +
                                             "Last Updated : " + LastUpdated + "<br />" +
                                             "Disk Config : " + DiskConfig + "<br />" +
                                             "Flavor Name : " + FlavorName + "<br />" +
                                             "Flavor ID : " + FlavorID + "<br />" +
                                             "Image Name : " + ImageName + "<br />" +
                                             "Image ID : " + ImageID + "<br />" +
                                             "Power :" + PowerState + "<br />";
                    }
                }
                else
                {
                    CS_m_ClearDdls();

                    var serverdetails = Servers.serversProvider().GetDetails(cslistserverid, dcregion);
                    var volumedetails = Servers.blockStorageProvider().ListVolumes(dcregion);

                    var Status             = serverdetails.GetDetails().Status;
                    var TaskState          = serverdetails.GetDetails().TaskState;
                    var VMState            = serverdetails.GetDetails().VMState;
                    var UserID             = serverdetails.GetDetails().UserId;
                    var HostId             = serverdetails.GetDetails().HostId;
                    var ServerId           = serverdetails.GetDetails().Id;
                    var TenantId           = serverdetails.GetDetails().TenantId;
                    var Created            = serverdetails.GetDetails().Created;
                    var LastUpdated        = serverdetails.GetDetails().Updated;
                    var DiskConfig         = serverdetails.GetDetails().DiskConfig;
                    var FlavorID           = serverdetails.GetDetails().Flavor.Id;
                    var FlavorName         = serverdetails.GetDetails().Flavor.Name;
                    var ImageID            = serverdetails.GetDetails().Image.Id;
                    var ImageName          = serverdetails.GetDetails().Image.Name;
                    var PowerState         = serverdetails.GetDetails().PowerState;
                    var PublicAddresses    = serverdetails.Addresses.Public.ToList();
                    var PrivateAddresses   = serverdetails.Addresses.Private.ToList();
                    var GetAttachedVolumes = serverdetails.GetVolumes().ToList();
                    var GetVolumeID        = volumedetails.ToList();

                    var listServerVolumeList = Servers.CS_m_ListServerVolumeList(dcregion);
                    foreach (var i in listServerVolumeList)
                    {
                        addItemToDdl(i);
                    }

                    bindlblCSInfo2(Servers.CS_m_ListAddresses(CS_ddl_ListServers.SelectedValue, dcregion));


                    foreach (var i in GetAttachedVolumes)
                    {
                        ListItem ListItemDisplayName = new ListItem(i.Device, i.Id);
                        CS_ddl_CBSAttachedVolume.Items.Add(ListItemDisplayName);
                    }

                    CS_lbl_CSInfo.Text = "Status : " + Status + "<br />" +
                                         "Task State : " + TaskState + "<br />" +
                                         "VM State : " + VMState + "<br />" +
                                         "User ID : " + UserID + "<br />" +
                                         "Host ID : " + HostId + "<br />" +
                                         "Server ID : " + ServerId + "<br />" +
                                         "Tenant ID : " + TenantId + "<br />" +
                                         "Created: " + Created + "<br />" +
                                         "Last Updated : " + LastUpdated + "<br />" +
                                         "Disk Config : " + DiskConfig + "<br />" +
                                         "Flavor Name : " + FlavorName + "<br />" +
                                         "Flavor ID : " + FlavorID + "<br />" +
                                         "Image Name : " + ImageName + "<br />" +
                                         "Image ID : " + ImageID + "<br />" +
                                         "Power :" + PowerState + "<br />";
                }
            }
            catch (Exception ex)
            {
                CS_lbl_Error.Text = " Server details are not available yet.";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Stopwatch TimeClock = new Stopwatch();

            TimeClock.Start();

            HttpContext.Current.Session["CSListServersName"]   = HttpUtility.HtmlEncode(CS_ddl_ListServers.SelectedItem);
            HttpContext.Current.Session["CSListServersID"]     = HttpUtility.HtmlEncode(CS_ddl_ListServers.SelectedValue);
            HttpContext.Current.Session["CSListServersRegion"] = CS_ddl_Region.Text;

            string region                  = CS_ddl_Region.SelectedItem.ToString();
            string cslistserverid          = CS_ddl_ListServers.SelectedValue.ToString();
            string cslistserveridsession   = (string)(HttpContext.Current.Session["CSListServersID"]);
            string cslistservernamesession = (string)(HttpContext.Current.Session["CSListServersName"]);
            string CloudIdentityUserName   = (string)(HttpContext.Current.Session["CloudIdentityUserName"]);
            string CloudIdentityApiKey     = (string)(HttpContext.Current.Session["CloudIdentityApiKey"]);

            var identity = new RackspaceImpersonationIdentity()
            {
                Username = CloudIdentityUserName, APIKey = CloudIdentityApiKey
            };

            CloudIdentityProvider identityProvider     = new net.openstack.Providers.Rackspace.CloudIdentityProvider(identity);
            CloudServersProvider  CloudServersProvider = new net.openstack.Providers.Rackspace.CloudServersProvider();

            Page.GetPostBackEventReference(CS_btn_RebootCloudServer);

            try
            {
                if (IsPostBack)
                {
                    HttpContext.Current.Session["PostBackListServerIdDDL"]   = HttpUtility.HtmlEncode(CS_ddl_ListServers.SelectedValue);
                    HttpContext.Current.Session["PostBackListServerNameDDL"] = HttpUtility.HtmlEncode(CS_ddl_ListServers.SelectedItem);
                }
                else
                {
                    if (string.IsNullOrEmpty((string)(Session["CloudIdentityUserName"])) & string.IsNullOrEmpty((string)(Session["CloudIdentityApiKey"])))
                    {
                        CS_lbl_Error.Text = "Before continuing please login and enter Cloud Username and API Key.";
                    }
                    else if (string.IsNullOrEmpty((string)(Session["CloudIdentityUserName"])))
                    {
                        CS_lbl_Error.Text = "Before continuing please login and please enter Cloud Username.";
                    }
                    else if (string.IsNullOrEmpty((string)(Session["CloudIdentityApiKey"])))
                    {
                        CS_lbl_Error.Text = "Before continuing please login and please enter API Key.";
                    }
                    else
                    {
                        var listimages = Servers.CS_m_ListImages();
                        bindListImagesNoIndexInDDL(listimages, "Name", "Id");

                        var listflavors = Servers.CS_m_ListFlavors();
                        bindListFlavorsNoIndexInDDL(listflavors, "Name", "Id");

                        var serverdetails = Servers.CS_m_ListServerInfo(region);
                        var firstserver   = serverdetails.First();
                        bindListServersNoIndexInDDL(serverdetails, "Name", "Id");

                        CS_m_GetCloudServerDetails(firstserver.Id, region);

                        TimeClock.Stop();
                        CS_lbl_TimeClock.Text = TimeClock.Elapsed.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                CS_m_MsgCatchException(ex.ToString());
            }
        }