asp.net - Get client id of the control -
asp.net - Get client id of the control -
i got client id of dropdown value as
ctl00_timecardcontentplaceholder_uc_0_1_drpdwncompany
i have value above string value 1
client id.
any methods substring()
there value string.
getclientidfromconrol(control control) { string strid=control.clientid; string strclientsid = strid.substring(38, 1); homecoming convert.toint32(strclientsid); }
if want 1.
you can utilize split
function job.
string dropdown="ctl00_timecardcontentplaceholder_uc_0_1_drpdwncompany"; string[] split=dropdown.split('_');//split underscore character; string result=split[4].tostring(); // here 1 result
hope helps.
asp.net .net string
Comments
Post a Comment