arrays - How do I use the Trim Function -
i'm converting web project vb c#, , can't figure out how implement trim function. have write specific function, or there way use in context of project? here functional vb code i'm trying convert. if need more details, please ask.
protected sub buttonsetup(byval dr datarow, byval btn button) btn.visible = true btn.text = dr("floor_name").tostring.trim() btn.commandargument = dr("floor_file").tostring.trim() btn.cssclass = "greybuttonstyle" addhandler btn.click, addressof me.schematic_button_click end sub
indexer
c#
uses square bracket[]
access element of indexer instead of parentheses()
event handler
addhandler
, addressof
both vb
keyword. in order add handler event, use +=
operator event left operand , handler right operand.
protected void buttonsetup(datarow row, button button) { button.visible = true; button.text = row["floor_name"].tostring().trim(); button.commandargument = row["floor_name"].tostring().trim(); button.cssclass = "greybuttonstyle"; button.click += schematic_button_click; }
Comments
Post a Comment