如何自定义asp.net服务器端控件? [英] How to customize asp.net server side controls ?

查看:112
本文介绍了如何自定义asp.net服务器端控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好



我只知道一些优秀的UI框架,如jquery UI,Bootstrap,Flat UI等。我的问题是这些可以应用于基本的服务器控件像按钮,菜单,文本框,下拉列表等?我曾经尝试使用jquery UI,它似乎无法在服务器上运行。

Hello

I just knew about some good UI frameworks like jquery UI, Bootstrap, Flat UI, etc. My question is can these be applied to basic server controls like buttons, menus, text boxes, dropdown list, etc. ? I tried once before with the jquery UI and it seems it does not work on the server.

推荐答案

简单的答案是,客户端代码无法与服务器端交互码。但是,一旦服务器端控件(如按钮)已下载并转换为HTML,您就可以使用其HTML属性与它们进行交互。



您可以了解如何JavaScript可以在这里对HTML内容进行样式化, https://developer.mozilla.org/en- US / docs / Web / API / HTMLElement.style [ ^ ]



但请记住,您无法操纵服务器端代码或控件。只能使用JavaScript(和/或其库,如jQuery)在浏览器中操作HTML渲染的输出。
Simple answer is, client-side code cannot interact with Server-side code. However, once the server-side controls such as Buttons have been downloaded and converted to HTML, you can then interact with them using their HTML attributes.

You can learn how can JavaScript stylize the HTML content here, https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement.style[^]

But remember, you cannot manipulate the server-side code or controls. Only the HTML rendered output of their can be manipulated inside the browser using JavaScript (and/or its libraries such as jQuery).


这篇关于如何自定义asp.net服务器端控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆