jquery和ajax之间的冲突
我使用 Igoogle 组件 inettuts 并且我在侧面有一些链接我的网页,如果用户删除一块数据,他可以取回它,我使用ajax
来实现我的目标,如下所示:
我的.aspx:
<ul id="column2" class="column" runat="server">
<asp:UpdatePanel ID="uppnl_2" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="rlv_mainservices"
EventName="ItemCommand" />
</Triggers>
</asp:UpdatePanel>
<!-- ////////////////////////////////////////////////-->
我的.cs:
protected void rlv_mainservices_ItemCommand(object sender, RadListViewCommandEventArgs e)
{
if (e.CommandName == "GetDtails")
{
try
{
int index = Convert.ToInt32(e.CommandArgument);
CreateBlockOfData("widget color-blue", 2, "aaa");
}
catch (Exception ee)
{
}
}
}
protected void CreateBlockOfData(string widget_color, int column_par, string process_name)
{
HtmlGenericControl outer_li = new HtmlGenericControl("li");
outer_li.Attributes.Add("class", widget_color);
if (column_par == 1)
{
column1.Controls.Add(outer_li);
}
else if (column_par == 2)
{
uppnl_2.ContentTemplateContainer.Controls.Add(outer_li);
}
else if (column_par == 3)
{
column3.Controls.Add(outer_li);
}
else if (column_par == 4)
{
column4.Controls.Add(outer_li);
}
//The rest of code
}
我的问题是:当我单击链接(在我的列表视图中)创建的数据块没有框架(inettuts)提供的(删除,编辑,最小化)功能!
如何解决ajax和jquery之间的冲突?
I use Igoogle component inettuts and I have some links in the side of my web page if the user remove a block of data he can get it back i use ajax
to achieve my goal as the following :
My .aspx :
<ul id="column2" class="column" runat="server">
<asp:UpdatePanel ID="uppnl_2" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="rlv_mainservices"
EventName="ItemCommand" />
</Triggers>
</asp:UpdatePanel>
<!-- ////////////////////////////////////////////////-->
My .cs :
protected void rlv_mainservices_ItemCommand(object sender, RadListViewCommandEventArgs e)
{
if (e.CommandName == "GetDtails")
{
try
{
int index = Convert.ToInt32(e.CommandArgument);
CreateBlockOfData("widget color-blue", 2, "aaa");
}
catch (Exception ee)
{
}
}
}
protected void CreateBlockOfData(string widget_color, int column_par, string process_name)
{
HtmlGenericControl outer_li = new HtmlGenericControl("li");
outer_li.Attributes.Add("class", widget_color);
if (column_par == 1)
{
column1.Controls.Add(outer_li);
}
else if (column_par == 2)
{
uppnl_2.ContentTemplateContainer.Controls.Add(outer_li);
}
else if (column_par == 3)
{
column3.Controls.Add(outer_li);
}
else if (column_par == 4)
{
column4.Controls.Add(outer_li);
}
//The rest of code
}
My problem is :when i click on the link (in my list view) the block of data created without(remove,edit,minimize)features which the framework(inettuts) provide !!
How to fix this conflict between ajax and jquery?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我理解得很好,你可以搜索 jQuery
http:// /api.jquery.com/jQuery.noConflict/
您在加载 jQuery 后调用它,然后使用 jQuery 进行调用
If I understand well you search for the
noConflict()
command of jQueryhttp://api.jquery.com/jQuery.noConflict/
You call it after you load the jQuery, and then you make your calls using the jQuery