Friday, March 1, 2013

How to make textbox Readonly and getting their value


1.On Page Load  use code like this
 txtyears.Attributes.Add("readonly", "readonly");
            txtMonths.Attributes.Add("readonly", "readonly");


2.Now you ca use textbox value simply as u always do

string test=txtyears.text