Development Desk

Just another site

Convert String to GUID in C#

string can be converted to GUID just by

Guid stringToGuid = new Guid(“GUID value in the form of String”);

for example

Guid stringToGuid = new Guid(“91a61ee7-48bb-4371-ad33-72oI67c9b3e”); 

it will give same Guid in return but in the form of GUID



Solution for an Exception in WCF “HTTP could not register URL http://+:8000/EssentialWCF/. Your process does not have access rights to this namespace”

All you just need to do is run your Visual Studio by an Administrator, by right click on visual studio and select “Run as Administrator”

Thank you

ASP.NET Master Page Controls, Contents or methods make available to all Derived pages.

Referencing Custom Master Page technique could be very help in the situation in which you want to access some master page to its Content pages e.g. User open a website and He/She gets Login to website now you needs user ID on every derived page to use or fetch some information from the database. It can be done in few easy steps

1. In Master page (Code behind file) make public property

public String UserID


get{ return (String)Session[“UserIdNumber”]; }

set{ Session[“UserIdNumber”] = value; }


2. After all @Page Directives properties Add @ MasterType declaration

<%@ Page Language = “C#” MasterPageFile = “~/Interface.master” …. %>

<@ MasterType VirtualPath = “~/Interface.master” %>

3. now simply Reference the Master page Property from the Content Page


String userId = Master.UserID;

it was the overall procedure to use this technique to set one property and accessible for all content pages.

to access control in child page FindControl method can be used

this code should be in Page_Load method and master page control must be public

Label lblUserID = (Label)Master.FindControl(“lblLoginUserID”);

lblUserID.Text = “Any value :-)”;

How to access windows form controls from another Form.

let suppose you have two windows forms open.

1st is frmRegistration

2nd is frmLogin

suppose there is Label control on the registration form named as lblIsRegistered and you want to access this control on the Login form.

firstly, you need to go into the properties of the lblIsRegistered label and check its Access modifier which will be private by default.

just make it Public.

secondly, on the login form make object of registration form like

frmRegistration registrationForm = new frmRegistration();

then access its public control e.g. String isRegisterCheck =  registrationForm.lblIsRegistered.Text;

Thank you very much


Difference Between Oracle Sql *plus and MS Sql Commands

1 week before i took the class test of Oracle SQL *Plus, I am also working on the term project so i decided that for the project i might use the MS SQL (MS SQL server 2008) then i start using this database server and i experienced that there is slight difference between the syntax of Oracle and MS SQL,

for instance

In Oracle to add column by using ALTER clause is

Alter table tablename

add ( column_name datatype not Null(etc) )

but in MS SQL it is

Alter table table_name

add column_name column_type not Null(etc)…

In Oracle if you want to use Modify clause you will use as

Alter table table_name

Modify (column_name data_type null or not Null(select one)

but in MS SQL

ALTER table table_name

Alter column column_name data_type null or not null(select one)

there is lot of data types difference between oracle and MS SQL as well.

Thank you.

Hello world!

The purpose of this blog is to share the development knowledge and experiences during software development…