How can set the default value of text as integer

Posted by Bageshkumarbagi under C# on 8/30/2013 | Points: 10 | Views : 764 | Status : [Member] | Replies : 1
Hi,

How can set the default value of text as integer.

Thanks,
Bagesh Kumar Singh
Mark as answer if you have been satisfied



Responses

Posted by: Bandi on: 8/30/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
>> How can set the default value of text as integer.
Means you are asking about this?
string intStr = "1";


If NOT, can you post the where you need this?

I think you want to set integer for a textbox? To convert text box text to integer,

int intValue = 0;

intValue = int.TryParse(TextBox1.Text );


EDIT:Refer this link once
http://stackoverflow.com/questions/11502951/how-to-hide-a-property-default-value-in-my-control

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Bageshkumarbagi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response