473,668 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why doesn't this ATLAS/AJAX code work???

I have an aspx page where I have a repeater control that repeats a asp:LinkButton. When I click on one of the links, I get a post back, and the page flashes. A friend told me to look into ATLAS/AJAX, but didn't go into much detail.

From what I read/gathered, I came up with this code:

<asp:SqlDataSou rce ID="dsCategorie s" runat="server" ConnectionStrin g="<%$ ConnectionStrin gs:cstrDataSour ce %>" SelectCommand=" SELECT [CategoryID], [Name] FROM [tblCategories] ORDER BY [Name]">
</asp:SqlDataSour ce>

<asp:Repeater ID="rptCategori es" runat="server" DataSourceID="d sCategories">

<ItemTemplate >

<atlas:UpdatePa nel ID="pnlCategori es" mode="Condition al">
<Content>
<asp:LinkButt on ID="lnkCategori es" runat="server" Visible="true" Style="font-weight: bold; font-size: 10pt; color: black; font-family: Arial; text-decoration: none"
OnClick="rptCat egories_OnClick " Text = '<%# DataBinder.Eval (Container.Data Item, "Name") %>'
/>
<br />
</Content>

<Triggers>
<atlas:ControlE ventTrigger ControlID="lnkC ategories" EventName="Clic k"/>
</Triggers>

</atlas:UpdatePan el>

</ItemTemplate>

</asp:Repeater>

so I have a repeater control, and inside the item template, I put the link button inside of an update panel, but this doesn't seem to stop the flashing at all, although it is calling rptCategories_O nClick... what am I doing wrong?

Thanks.

Nov 21 '06 #1
2 1729
Hi,
You need to put the whole repeater inside the content template of the update
panel and change the trigger to use the id of the repeater and the
ItemCommand Event of the repeater.
I'm sending a working version of the code uoy supplied, but it's modified to
work on the ASP.NET Ajax Beta 2
<asp:SqlDataSou rce ID="dsCategorie s" runat="server" ConnectionStrin g="<%$
ConnectionStrin gs:TVETConnecti onString %>" SelectCommand=" SELECT
[AccreditationLe velID], [AccreditationLe velName] FROM [AccreditationLe vels]">
</asp:SqlDataSour ce>
<asp:UpdatePane l ID="pnlCategori es" runat="server" UpdateMode="Con ditional">
<ContentTemplat e>
<asp:Repeater ID="rptCategori es" runat="server" DataSourceID="d sCategories" >

<ItemTemplate >

<asp:LinkButt on ID="lnkCategori es" runat="server" Visible="true"
Style="font-weight: bold; font-size: 10pt; color: black; font-family: Arial;
text-decoration: none"
OnClick="rptCat egories_ItemCom mand" Text = '<%#
Eval("Accredita tionLevelName") %>'
/>
<br />

</ItemTemplate>

</asp:Repeater>
</ContentTemplate >

<Triggers>
<asp:AsyncPostB ackTrigger ControlID="rptC ategories" />
</Triggers>
</asp:UpdatePanel >

Regards,
Mohamed Mosalem

"Nobody" wrote:
I have an aspx page where I have a repeater control that repeats a asp:LinkButton. When I click on one of the links, I get a post back, and the page flashes. A friend told me to look into ATLAS/AJAX, but didn't go into much detail.

From what I read/gathered, I came up with this code:

<asp:SqlDataSou rce ID="dsCategorie s" runat="server" ConnectionStrin g="<%$ ConnectionStrin gs:cstrDataSour ce %>" SelectCommand=" SELECT [CategoryID], [Name] FROM [tblCategories] ORDER BY [Name]">
</asp:SqlDataSour ce>

<asp:Repeater ID="rptCategori es" runat="server" DataSourceID="d sCategories">

<ItemTemplate >

<atlas:UpdatePa nel ID="pnlCategori es" mode="Condition al">
<Content>
<asp:LinkButt on ID="lnkCategori es" runat="server" Visible="true" Style="font-weight: bold; font-size: 10pt; color: black; font-family: Arial; text-decoration: none"
OnClick="rptCat egories_OnClick " Text = '<%# DataBinder.Eval (Container.Data Item, "Name") %>'
/>
<br />
</Content>

<Triggers>
<atlas:ControlE ventTrigger ControlID="lnkC ategories" EventName="Clic k"/>
</Triggers>

</atlas:UpdatePan el>

</ItemTemplate>

</asp:Repeater>

so I have a repeater control, and inside the item template, I put the link button inside of an update panel, but this doesn't seem to stop the flashing at all, although it is calling rptCategories_O nClick... what am I doing wrong?

Thanks
Nov 21 '06 #2

"Mohamed Mosalem" <Mo************ @discussions.mi crosoft.comwrot e in
message news:75******** *************** ***********@mic rosoft.com...
Hi,
You need to put the whole repeater inside the content template of the
update
panel and change the trigger to use the id of the repeater and the
ItemCommand Event of the repeater.
I'm sending a working version of the code uoy supplied, but it's modified
to
work on the ASP.NET Ajax Beta 2
Thanks, I got it working now... I think through out my moving code around to
get it working, that was one of the things I tried.. so that was one
issue... but the bigger issue was that I didn't put all the junk inside the
web config to enable ajax. Wasn't aware you had to do that til I noticed an
error on the IE status bar.
Nov 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1769
by: needin4mation | last post by:
I understand this is a asp.net group, but thought I would post this here for comments. I admit I have used this post in another group, but it has less traffic. Here's to hoping I'm just blind to the obvious: I have been reading a lot about AJAX. I want to use it and will. But I keep reading about how it doesn't make a roundtrip to the server, no postback, etc. But isn't the truth that *something* makes a trip to the server? It may...
8
2511
by: darrel | last post by:
I'm going to be diving into ASP.net 2.0 on a small project. I'd also like to use it as an excuse to start playing with some AJAX techniques. So, that leads to the obvious question: AJAX.net vs. Atlas? Anyone have any opinions on that? It looks like Atlas is still considered 'beta' so perhaps that's one strike against it.
5
1390
by: Papanii Okai | last post by:
Hi Guys, As we wall know Atlas is a fairly new feature everyone is talking about (atleast at my school). Even though the idea of Ajax has been used in the past i was wondeing if anyone could explain a few things to me. Comparing the performance of both asp.net client call backs and Atlas which is faster? Do they necessarily do the same things? Are there things Atlas can do that client callbacks can't? Secondly, even though there is a Atlas...
5
1626
by: geekboy0001 | last post by:
Just trying to get some opinions out there... There are tons of Ajax libraries out there... Ajax.NET Professional, ComfortASP.NET, ZumiPage, etc. etc... Microsoft has their own too, Atlas. I've been looking at these and certainly there needs to be a solution that's integrated with MS.NET, easy to use, and well supported to production environments. That's why I ask -- can there ever possibly be a real (free or paid) competitor to...
2
1792
by: A.Wussow | last post by:
Hi Everybody, i want to load dynamically content from some user controls (with forms, or some data-controls) using atlas. So i use an UpdatePanel for loading the user control into a placeholder. Using buttons for loading new content works fine. But i still want to use a function which is callable per javascript. I think this way is more flexable than using the Buttons, becaus every button needs it's own Sub-Routine. But i want to have...
1
1225
by: MPA | last post by:
Hi, I am a newbee to web applications and we are planning to rewrite our existing PowerBuilder client-server application into a web application under Visual Studio .Net 2005. My question is about Atlas. 1. Does Atlas only enhance programming with ASP .NET or can sometimes be an alternative? 2. We have only small resources, look for stability and do not want to rewrite our app each year or every two years due to the technology changes
5
1884
by: igotyourdotnet | last post by:
I have a question on atlas: I can create an 'atlas project' and I can add atlas controls fine. but when I try and add an atlas control to an existing asp.net web app I can't, Why? I did notice that the web.cofig file is different then a normal web app web.config. Do I need to add anything to the web.config file of my existing web app or no? I have the Microsfot.Web.Atlas.dll referenced in my web app. what else do I need to do to add...
4
2037
by: s.bussing | last post by:
Hi All, I'm new to Atlas and I did some programming using AJAX, but I'm wondering if it is possible to hava a javascript which can call a server-site function, in my case to write data to the cache, using AJAX. So I'm not looking for a possibility to wrap-up controls, but just to call server-site code from ATLAS. I know this can be done using AJAX, so in my opinion this should also be possible using ATLAS, or can ATLAS just be used...
3
2630
by: =?Utf-8?B?UGFycm90?= | last post by:
I applied the following Ajax code in my web page which has a calendar control to keep my page from completely reloading everytime something was changed. <atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/> <atlas:UpdatePanel runat="server" ID="UpdatePanel1" Mode="Conditional"> <ContentTemplate> After inserting this code, my calendar stopped working in that if I clicked on a date, nothing would...
0
8459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8374
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8890
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8791
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8575
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8653
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2784
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.