如何在asp.net中添加

问题描述:


我有

Hi
i have

string LastYearId=C2011 
string  tot= 00024


在asp.net(cs)页面中.我必须生成
ID.我就是那样............


in asp.net(cs) page. I have to generate
id. i am doing like that............

string GenerateID = LastYearId.Trim()+ tot;


输出为:


and output is:

GenerateID = C2011 00024 


但是我不希望C201100024之间有任何空格.


but i don''t want any space between C2011 and 00024. where i am making mistake can any one help me.

尝试过类似的东西吗?
Tried something like that?
string GenerateID = LastYearId.Trim()+tot.Trim();


也许您需要在tot上调用Trim()?

Maybe you need to call Trim() on tot?

<br />
string GenerateID = LastYearId.Trim() + tot.Trim();<br />


您所做的一切都是正确的.
还是你们都修剪.
Whatever you are doing is correct.
Still you trim both.
string GenerateID = LastYearId.Trim() + tot.Trim();