0
我需要將devexpress控件(例如複選框)「轉換」爲控制器中的html字符串。喜歡它看起來在頁面上。請告知如何去做。將控制轉換爲html
頁:
<input name="myCheckBox" id="chB_S" style="width: 0px; height: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; position: relative; background-color: transparent;" readonly="readonly" value="I"/>
控制器:
CheckBoxSettings s = new CheckBoxSettings();
s.Name = "myCheckBox";
s.Properties.ClientSideEvents.ValueChanged = "function(s,e){alert('Selection changed');}";
CheckBoxExtension chBut = new CheckBoxExtension(s);
string zzz = chBut.GetHtml().ToHtmlString(); //Get empty string instead of html