is it possible to change the button text on the Ajax control toolkit's AsyncFileUpload c开发者_如何学运维ontrol from "Select File" (modern style) to something else? it should be a simple thing like Text property on Button, but I can't find any property for this. also is it possible to apply any other custom styles for the button?
Download the Ajax Toolkit source code and make the styling adjustments there. Recompile the project and use the new DLL. The controls tend to have styling embedded as web resources, which override the CSS you may try to apply.
there is another one way
<div class="inputblock" style="width: 350px;">
<ajaxToolkit:AsyncFileUpload runat="server" ID="FileUP" ClientIDMode="AutoID" UploaderStyle="Modern" OnUploadedComplete="FileUP_UploadedComplete" Width="100%" />
</div>
these renders something like this
<div id="ctl00_PopUpPlaceHolder_FileUP">
<input name="ctl00$PopUpPlaceHolder$FileUP$ctl00" id="ctl00_PopUpPlaceHolder_FileUP_ctl00" type="hidden">
<div id="ctl00_PopUpPlaceHolder_FileUP_ctl01" style='background: url("/WebResource.axd?d=some&pars") no-repeat 100% 1px; margin: 0px; width: 100% !important; height: 24px; text-align: right; min-width: 100%;'>
<input name="ctl00$PopUpPlaceHolder$FileUP$ctl02" id="ctl00_PopUpPlaceHolder_FileUP_ctl02" style="width: 100%; font-size: 14px; opacity: 0; -moz-opacity: 0.0;" type="file">
<div style="text-align: left; margin-top: -23px;" type="text">
<input name="ctl00$PopUpPlaceHolder$FileUP$ctl04" id="ctl00_PopUpPlaceHolder_FileUP_ctl04" style="width: 248px; height: 17px; font-family: Tahoma; font-size: 12px;" type="text" readonly="readonly">
</div>
</div>
and you always may change th css to change any syling like this:
#ctl00_PopUpPlaceHolder_FileUP_ctl01 {
background: url("/img/input_file.png") no-repeat right top !important;
//some othe stylings, but "!important" is strongly necessarily
}
this works.
精彩评论