问题描述
我使用了链接
这是我的.aspx页面的代码
here are my code for the .aspx page
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jqueryui.css"
rel="stylesheet" type="text/css" />
<script type="text/jscript" src="http://ajax.googleapis.com/ajax/libs/jquery1.5/jquery .min.js"></script>
<script type="text/jscript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/jscript">
$(document).ready(function() {
$("#progressbar").progressbar({ value: 37 });
});
</script>
</asp:Content>
进度条的div是这个
<div style="margin-left: 10px; margin-right: 10px;" id="progressbar"> </div>
我尝试遵循源页面上给出的说明,但是没有任何效果.你能告诉我我在这里想念的吗?提前谢谢. (已修复此部分.我在放置我的内容占位符时犯了一个错误)
i tried to follow the instructions given on the source page but nothing worked. can you tell me what i am missing here? thanx in advance. (Fixed this part.i made a mistake at placing my contntentplaceholder)
我如何以某种方式更改该值,以便在按下按钮时可以动画显示....页面中按钮的代码如下:
how can i change the value in a way so that it animates when i press a button.... the button's code in the page is as follows :
<asp:Button ID="btnConfirm" CssClass="button" SkinID="Common" runat="server"Text="Confirm"OnClick="btnConfirm_Click" />
推荐答案
尝试一下:
<script type="text/jscript">
jQuery(document).ready(function() {
jQuery("#progressbar").progressbar({ value: 37 });
});
</script>
asp.net也将
$
用于其自己的客户端javascript.
$
is also used by asp.net for its own clientside javascript.
考虑我们 jQuery.noConflict()
您可以像这样封装您的jQuery代码:
You could encapsulate your jQuery code like this:
jQuery.noConflict();
(function($) {
$(function() {
$(document).ready(function() {
$("#progressbar").progressbar({ value: 37 });
// more code using $ as alias to jQuery
});
})(jQuery);
要更新该值,请在上面的内容和按钮旁加上UpdatePanel
.
To update the value surround your content above and the button with an UpdatePanel
.
将进度百分比分配给asp文字.
Assign the Progress percentage to an asp literal.
jQuery.noConflict();
(function($) {
$(function() {
$(document).ready(function() {
$("#progressbar").progressbar({ value: <asp:Literal runat="server" ID="ProgressPercentage" /> });
// more code using $ as alias to jQuery
});
})(jQuery);
在按钮上单击
ProgressPercentage.Text = progress.ToString();
这篇关于使用asp.net中的进度栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!