Sunday, March 11, 2012

Globalization/Localisation and WebServices

Mark your web method with the following attribute:

[WebMethod(EnableSession =true)]


Thanks for this answer,

I am coding in vb.net, so it should look like this:

<WebMethod(EnableSession =True)> _

But this produces an error, VS2005 tells me that EnableSession has not been declared.


For VB it would be:
< WebMethod(EnableSession :=True)
Mark it as answer if it works.


the correct syntax was indeed

<WebMethod(enableSession:=True)> _

Thnaks a lot for your help

Globalization / localization at client side

Any thoughts?

Cool

Global.asax Application_Error not triggered

hello.

if i recall correctly, page errors are intercepted by the scriptmanager control. you can handle them by treating the pageerror event. as you might guess, those errors are cleaned by the ScriptManager and won't propagate to the global app error handler you've set up on global.asax

global exception handling with ajax.net

Hi! I has the same problem. I resolved to change the code from Application_Error to specialized class to catch the exception to eventlog. So, OnAsyncPostBackError of ScriptManager calls the same specialized class too.


the OnAsyncPostBackError event doesn't even fire i don't know what to do !!


The Application_Error works mainly when you replace your page - i.e when you actually
submit form and waits for the whole page to return (not an AJAX call)

If your application_error deals only with AJAX calls you shold throw your own exception to the client
and deal with it in your cient error handler. (Use window.location instead of redirect from the server)

Otherwise - throw yor own exception from the web method and deal with it on your error handler.


well that's cool i've thought of that although i think it's messy i still want to know what's wrong with OnAsyncPostBackError


I don′t use WebServices as you, but my event is fire (My using is very simple with UpdatePanel). I has been problem in Application_Error event, when I has setting the page error in web.config. In case, the HealthMonitoring dont′t was fired. Try remove any configuration of page error of WebConfig.


Hi bo2bo2,

Based on your description, I think the exact root cause is "OnAsyncPostBackError" running on server side and ajax calling web service on client side independently. So you should catch the errors that occurred while visiting webservice on client .Here is an useful url: http://ajax.asp.net/docs/mref/E_System_Web_UI_ScriptManager_AsyncPostBackError.aspx Hope it helps. If I misunderstood you, please let me know.

Given up trying to use Ajax

Nope, I found it very easy to use. Installed the framework, started a new AJAX enabled site, added a ScriptManager and UpdatePanel to my page and all worked as expected.


Hi Bopo,

Well i don't have any problems with using MS AJAX. just download v1.0:

http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en

Run the msi and there is a ASP.NET Ajax enabled website available (VS2005) for you and there you go. It should work in a couple of minutes.

Regards,


Hi

I have already downloaded that several times, and it is installed, anyway I gave it another try using a different approach, at go a little father, I just open a new ajax template and dragged the rating tool onto the default page and ran it, but a diglouge box pops up looking for a file named 'ExtenderControlBase.cs' which is a little weird, as i am using VB.

Anyway does anyone know where this is located? I am looking through each folder within the Microsoft ASP.NET folder

Help appreciated


Hi Bopo,

This is probably a bug in your AjaxControltoolkit. The toolkit has an ExtenderControlBase.cs. What i would suggest is first create a simple page with a scriptmanager and an updatepanel to see if your Ajax project is working right. When this works like the way it should then reinstall the toolkit and try again some controls of the Ajax toolkit. Good luck!

Regards,


Found itBig Smile


Did you found the cs file? and what is the status of your Ajax projectConfused

Regards,

given a host who has not installed asp.net Ajax rc 1.0 how can i get an AJAX site to work

Install the current release on your Dev machine then place the release version of the DLLs in your remote /bin/ folder, finally update your root web.config file.

You can use the sample web.config, just add or make changes as needed.

Give a sign when data has changed in GridView

If u want to do something as the result of Partial Postback(in here the change of data in gridview) in a UpdatePanel,I think you could use a trigger.


Trigger's trigger the update panel to do something based on another event, they have nothing to do with monitoring the status of the updatepanel itself.

What you want to do is call Sys.WebForms.PageRequestManager.getInstance().add_endRequest(someFunction) where someFunction is custom code in javascript you want fired when the UpdatePanel is done. Conceivably, you could inspect the EndRequestEventArgs object that gets passed to someFunction as its first parameter to glean information about the request. You might have to maintain some kind of state on the client to pull this off.

gif not animated in update progress?

Hi,

According to my test,The following code works:

<%@. Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
protected void Button1_Command(object sender, CommandEventArgs e)
{
System.Threading.Thread.Sleep(3000);
Label1.Text = "The time is: " + DateTime.Now.ToString();
}
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>UpdatePanelTutorialIntro1</title>
<style type="text/css">
#UpdatePanel1 {
width:300px; height:100px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div style="padding-top: 10px">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<fieldset>
<legend>UpdatePanel</legend>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br />
<asp:Button ID="Button1" runat="server" OnCommand="Button1_Command" CommandArgument="Hello!"
Text="Button" />
</fieldset>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
Processing...
<img src="http://pics.10026.com/?src=1061_8335.gif" mce_src="1061_8335.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
<br />
</div>
</form>

<script type="text/javascript" language="javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function BeginRequestHandler(sender, args)
{
document.getElementById("Button1").disabled = true;
}
function EndRequestHandler(sender, args)
{
document.getElementById("Button1").disabled = false;
}
</script>

</body>
</html>

Hope this helps.

It is not about your code,I guess the Gifs at other site are not animated in your IE too.

If you have further questions on this, you must do some changes on the IE setting.


if I put a simple button with:
protected void Button1_Click(object sender, EventArgs e) { System.Threading.Thread.Sleep(3000); }

It works!

But with my sorting, I have problem:

My image begins to liven up, then bug and does not liven up any more.
As if the treatment was too heavy.


Sound strange,I am afraid we cannot find out the exact root cause without further information captured when the problem occurs.

I think that I really need the source code to reproduce the problem, so that I can investigate the issue. It is not necessary that you send out the complete source of your project. I just need a simplest sample to reproduce the problem. You can remove any confidential information or business logic from it.

Thank you.


1<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>23<%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>4<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">5<html xmlns="http://www.w3.org/1999/xhtml">6<head runat="server">7 <title>Untitled Page</title>8</head>9<body>10 <form id="form1" runat="server">11 <asp:ScriptManager ID="ScriptManager1" runat="server" />12 <div>1314 <asp:UpdateProgress ID="UpdateProgress1" runat="server">15 <ProgressTemplate>16 <img src="gears_an.gif" alt="a" />17 update in18 progress...19 </ProgressTemplate>20 </asp:UpdateProgress>21 <br />22 <table>23 <tr>24 <td rowspan="3">25  26 </td>27 <td colspan="2" rowspan="3">28    29 <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" UpdateMode="Always">30 <ContentTemplate>31  <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:maConnectionString%>"32 SelectCommand="SELECT [CID], [CNom], [CPrenom] FROM [t_RCTMT_Candidat]"></asp:SqlDataSource>33  34 <asp:GridView ID="GridView2" runat="server" AllowSorting="True" DataSourceID="SqlDataSource2">35 </asp:GridView>36 </ContentTemplate>37 </asp:UpdatePanel>38 <cc1:UpdatePanelAnimationExtender TargetControlID="UpdatePanel1" ID="UpdatePanelAnimationExtender1"39 runat="server">40 <Animations>41 <OnUpdating>42 <Color PropertyKey="color"43 StartValue="#FF0000" EndValue="#FFFFFF" />44 </OnUpdating>45 <OnUpdated>46 <Color PropertyKey="color"47 StartValue="#FFFFFF" EndValue="#000000" />48 </OnUpdated></Animations>49 </cc1:UpdatePanelAnimationExtender>50 </td>51 <td style="width: 16px">52  </td>53 <td style="width: 29px">54  </td>55 </tr>56 </table>57 </div>58 </form>59</body>60</html>

gif image doesnt do any animation in IE6

I saw the progress bar...

Hi,

that progress bar is not an animated gif. Since the page is a bit large in size, the progress bar is updated as long as the page is rendered. If you browse the code, you'll notice a bunch of UpdateProgress() calls, that simply changes the width of the div that represents the completed percentage. It's just to let the user see that something is happening.


Hi,

ops, sorry I thought you were talking about the progress bar in the Mashup.aspx page. Well the image in the Load.aspx is an animated gif, but I can see the animation in IE6 without problems.


Can you please then do me a little favour? Check the link http://aspspider.org/sevob/Form1.aspx on my page and tell me does the progress works as expected.

Getting xml back from a SOAP request

Hi Kenny,

We are considering adding better support in Atlas for this type of scenarios. For now, one thing you can try is to change your method to return an xmlstring, instead of an xml object. You can then get a DOM on the client by calling:

var xmlDOM = new XMLDOM(xmlString)

David

Getting wrong dates

Hello mrmercury

I would try to switch to Date formated string instead of date directly

Hope this helps

regards,

G


Thanks for the reply, it seams that this behavior is caused by the de-serialization in .NET, it converts the date to UTC time, I think I will have to convert all my dates with d.ToLocalTime() to obtain the original date.

Getting values of dropZone after postback

Hi,

this task is better accomplished on client-side. Supposing that the drop zone is a ListView + DragDropList, you can retrieve the items by calling get_data() on the drop zone's ListView.
Then you can consider adding the informations you need to a DataSource control, or sending them to the server in another format.

Getting values of a controls which are in update panel

Use the .children collection (http://msdn.microsoft.com/workshop/author/dhtml/reference/collections/children.asp) to find all the controls.

You could also debug the javascript and inspect the child controls:
<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(pageLoaded);
function pageLoaded(sender, args) {
var updatedPanels = args.get_panelsUpdated();
if (updatedPanels.length > 0) {
debugger;
}
}
</script
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="label1" runat="server"></asp:Label>
<asp:Button ID="button1" runat="server" OnClick="button1_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html
Wish the above can help you.

Getting values from javascript to ajax webservice in a strange manner

Can you post the code you are using?

hi,

I found out the problem... the matter was that i was'nt returning the bool to the calling event from the button.

but I have another question now. Can we take value from a asp textbox control in java script and send it to the webservice.

plz let me know sir..


Try this.http://ajax.asp.net/docs/tutorials/ConsumingWebServicesWithAJAXTutorial.aspx

Getting value from Cascading Drop Down Lists

alright - I figured out what my problem was - I didn't have EnableEventValidation set to false and AutoPostBack set to true on the dropdownlists. Now I have another quick question. How do I determine if a drop down list has been 'enabled' yet. Basically, I want to check if there's any subcategories beneath the current category. In Page_Load, I check the dropdownlist2.enabled property, and it's always set to true, even if it hasn't been enabled by the cascadingdropdown object. How do I check to see if the dropdownlist has been enabled? I could just do another query, but if there's a property I could check of either the dropdownlist or the cascadingdropdown, it would be much faster.

getting undefined values in autocomplete textbox

Try to set a break point to

Return items

and see what you method return in real.


Thank very much stmarti for giving quick reply. I debugged the code. I was getting items(0): 000013 items(1): 000007 items(2): 000005 items(3): 000008 items(4):000010

I was getting the correct values for the items. I am unable to find out the bug residing in it. Please help me

Thanks In Advance


Hi

Thanks a lot. I resolved the issue with the following link

http://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=13342

Thanks

Getting the value of DynamicContextKey

In case I wasn't clear enough, here is the full code sample:

<div id="divAddComment" class="ModalPopup" style="display: none;">
<div class="Control">
<asp:TextBox ID="TextBoxComment" runat="server" TextMode="multiLine" Rows="5" />
</div>
<asp:Button ID="ButtonAddComment" runat="server" Text="Add comment" OnClick="ButtonAddComment_Click" />
<asp:Button ID="ButtonCancel" runat="server" Text="Cancel" />
<asp:Label ID="LabelID" runat="server" />
</div
<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_OnItemDataBound">
<ItemTemplate
<asp:LinkButton ID="LinkButtonAddComment" runat="server" Text="Add comment" />
<ajaxToolkit:ModalPopupExtenderID="ModalPopupExtenderAddComment"
runat="Server"
DynamicServiceMethod="GetContent"
DynamicContextKey='<%# Eval("ID")%>'
DynamicControlID="LabelID"
BackgroundCssClass="modalBackground"
TargetControlID="LinkButtonAddComment"
PopupControlID="divAddComment" /
</ItemTemplate>
</asp:Repeater>

[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static string GetContent(string contextKey)
{
return contextKey;

// I thought about saving the value here, but I think this needs to be
// a static method to work
}

protected void ButtonAddComment_Click(object sender, EventArgs e)
{
// when the modal pop is displayed, the correct value is displayed for LabelID

// when I try to access the LabelID.Text property,
// the value is always an empty string

// how can I access this value from this function?

}

If anyone has any ideas, please let me know. This one has me stumped.


You can get and set the DynamicContextKey using the private _dynamicContextKey property

where "popone" is the id or bahaviourID for you modal modalpopup extender.

popper = $find("popone");
if (popper){
popper._DynamicContextKey = ctxval;
popper.show();
}

If you want to use this client side you could drop it into hiddenfield value or use a PageMethod.


Thanks for the reply. Is there a way I can get the DynamicContextKey value from my ButtonAddComment_Click() event? I can't figure out how to access the ModalPopupExtender because it is inside a Repeater.


If you put the value there server side then you know what the value is, so reference the

value in the normal way. If you have changed the value on the client side, you can get get it back server side by putting it into the value of hidden field.

So

in the clientside onclick event

1. $get(hiddenFldId).value = $find('poper')._DynamicContextKey

2. return true;

On serverside

hiddenfld.value will contain client side value.

If you want to get the correct hiddenFldId I use <% =hiddenFld.ClientID %>

Does this help?


I'm trying to access the value server side. This is where I'm having the problem. The value for theLabelID displays the DynamicContextKey value OK in the modal popup, but when I access the LabelID.Text property in code it is always an empty string.

I also tried using a HiddenField control instead, but the same thing happens with the HiddenField.Value property.


Hi,

The content of a label won't be posted to server, so you need to use a HiddenField or TextBox to save it on client.

Here is a sample:

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<script runat="server">
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static string GetContent(string contextKey)
{
return contextKey;

// I thought about saving the value here, but I think this needs to be
// a static method to work
}

protected void ButtonAddComment_Click(object sender, EventArgs e)
{
// when the modal pop is displayed, the correct value is displayed for LabelID

// when I try to access the LabelID.Text property,
// the value is always an empty string

// how can I access this value from this function?
Response.Write(TextBox1.Text);
}

protected void Page_Load(object sender, EventArgs e)
{
Northwind nt = new Northwind();
System.Data.DataTable dt = nt.GetBasicInformationOfAllEmployees();
Repeater1.DataSource = dt;
Repeater1.DataBind();
}

protected void Repeater1_OnItemDataBound(object sender, RepeaterItemEventArgs e)
{

}
</script
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager
</div
<div id="divAddComment" class="ModalPopup" style="display: none;">
<div class="Control">
<asp:TextBox ID="TextBoxComment" runat="server" TextMode="multiLine" Rows="5" />
</div>
<asp:Button ID="ButtonAddComment" runat="server" OnClientClick="saveValue();"Text="Add comment" OnClick="ButtonAddComment_Click" />
<asp:Button ID="ButtonCancel" runat="server" Text="Cancel" />
<asp:Label ID="LabelID" runat="server" /><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div
<script type="text/javascript">
function saveValue()
{
var tb = $get("TextBox1");//.value = innerHTML
var lb = $get("LabelID");//.value;
tb.value = lb.innerHTML;
}
</script>

<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_OnItemDataBound">
<ItemTemplate
<asp:LinkButton ID="LinkButtonAddComment" runat="server" Text="Add comment" />
<ajaxToolkit:ModalPopupExtenderID="ModalPopupExtenderAddComment"
runat="Server"
DynamicServiceMethod="GetContent"
DynamicContextKey='<%# Eval("EmployeeID")%>'
DynamicControlID="LabelID"
BackgroundCssClass="modalBackground"
TargetControlID="LinkButtonAddComment"
PopupControlID="divAddComment" /
</ItemTemplate>
</asp:Repeater
</form>
</body>
</html>

Hope this helps.

Thanks! That was exactly what I was looking for, it's working great.

Getting the selected TEXT of a CascadingDropDown??

Not to worry guys - I just found the answer to this. Apparently it was an existing issue that has now been patched in the latest build of the Atlas Control Toolkit

the correct property was:

CascadingDropDown1.SelectedItem.Text

Getting the response

Re #1: I thought the result variable would be the string returned from the service... Try calling debug.dump(result, "info", true) to see what the object contains.

Re #2: There are a number of posts on this forum regarding this question... Last I heard is that a go live license is expected sometime in 2006.
Where does debug.dump get dumped?
On the page. Usually.

Getting the position of a panel (especially given a dragpanelextender)

Maybe via the AjaxControlToolkit.CommonToolkitScripts.getCurrentStyle() helper?

Well... it's been a while since you helped me out. Sorry for the delay in responding. I can't seem to find any functions under CommonToolkitScripts. There are only the two from the base object class. I feel foolish. I'm sure I'm missing something simple, but what?


The 61121 release of the Toolkit has about 20 helper functions in AjaxControlToolkit.CommonToolkitScripts (defined in Common.js).

Getting the ID of the UpdatePanel that was updated in the most recent asynchronous postbac

In your example, sender._panelsToRefreshIDs is an array of UpdatePanel IDs being updated.


Hi i haven't really tried sender._panelsToRefreshIDs.

But i have used args.get_panelsUpdated()in my app. It works great.


Hi

I tried to use the sender_panelsToRefreshIDs as follows in the code, but it does not seem to work:

<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args)
{
var updatedPanels = sender._panelsToRefreshIDs;
for (i = 0; i < updatedPanels.length; i++)
{
if (updatedPanels[i] == "UpnlImages1")
{
var objDiv = document.getElementById("ctl00_InnerContentPlaceHolder_pnlImages1");
objDiv.scrollLeft = 0;
objDiv.scrollLeft = objDiv.scrollWidth;
}
}
}
</script>

I tried checking the ID of the UpdatePanel control (UpnlImages1 that is used in Visual Studio) as well as the ID that is generated in the browser (ctl00_InnerContentPlaceHolder_UpnlImages1) for the UpdatePanel of interest to me.

what am I doing wrong here. Thanks



I'd suggest either putting an alert(updatedPanels[i]) in your loop, or using FireBug to set a breakpoint at that position and inspect the value of the array.

This is an old, but still relevant post I made about using FireBug for that purpose:http://encosia.com/2007/03/06/debug-and-explore-aspnet-ajax-with-firebug/


I had placed the alert dialog earlier, but IE did not display it at all because of some unknown Javascript error on that page.

I tried it in Firefox and the array displayed the UpdatePanel's ID value as "ctl00$InnerContentPlaceHolder$UpnlImages1" instead of "ctl00_InnerContentPlaceHolder_UpnlImages1" (which is how you see it in browser's view source).

So i replaced the _ to $ in my if condition and it worked.

Thanks for all your help.


No problem. Glad you got it working.

Getting the id of TargetControlID in javascript

What targetControlId?

What does the js do?

Can you please be a bit more specific?

Kind regards,
Wim


Hi,

Based on my understanding, you want to get the client side id of the target control with javascript.

Here is how:

function pageLoad() {
var ext = $find("behaviorID of the extender");
var ele = ext.get_element();
var id = ele.id;
}


Raymond Wen - MSFT:

Hi,

Based on my understanding, you want to get the client side id of the target control with javascript.

Here is how:

function pageLoad() {
var ext = $find("behaviorID of the extender");
var ele = ext.get_element();
var id = ele.id;
}

Thanks that got the id fine. Realised I needed the UniqueID though which I don't think is possible with javascript so I ended up passing the UniqueID of the TargetControlID to the javascript from the Extender's class file.


DavidRhodes:

Realised I needed the UniqueID though

Try this:

$find('<%=ExtendersIDYouNeedToFillIn.ClientID%>');

Kind regards,
Wim

Getting the date from the Calendar Extender control instead of target

Hi benyl,

The SelectedDate of the CalendarExtender is just to set an initial selected date on the calendar.

You can't use is to get the last selected date by the user.The selectedDate property isn't updated to the date the user selects!!

Solution:

You should get the last selected date out of a textbox where the calendarExtender places his selected date. If you don't want users to see that textbox, you can always hide it with css.

Please let me know if that works out for you!

Kind regards,
Wim


Thanks. That is what I thought. Haha, I guess I was just being lazy.

So you have to instantiate a new DateTime object from the string that is put in the text box. Meaning you have to parse it.

Thanks again!

Getting the AJAX Toolkit

Looks like they are back online.

Getting Textbox Watermark Text in client side javascript

This example is a modified version of the the Toolkit's TextBoxWatermark.aspx. The key is assigning a BehaviorID to the TextBoxWatermarkExtender and then you can locate it using $find.
<asp:Content ContentPlaceHolderID="SampleContent" Runat="Server"> <script> function compareText() { var tb = $get("<%=TextBox1.ClientID %>"); var behavior = $find("Extender1"); if(tb.value == behavior._watermarkText) { alert("Value has not changed!"); } else { alert("Value has changed!"); } } </script> <asp:ScriptManager EnablePartialRendering="true" runat="Server" /> <div class="demoarea"> <div class="demoheading">TextBoxWatermark Demonstration</div> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> First name: <button onclick="compareText()" value="aaa">aaa</button> <asp:TextBox ID="TextBox1" CssClass="unwatermarked" Width="150" runat="server" /><br /> <ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="TextBox1" WatermarkText="Type First Name Here" WatermarkCssClass="watermarked" BehaviorID="Extender1" /> Last name: <asp:TextBox ID="TextBox2" CssClass="unwatermarked" Width="150" runat="server" /><br /><br /> <ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" runat="server" TargetControlID="TextBox2" WatermarkText="Type Last Name Here" WatermarkCssClass="watermarked" /> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Submit" /> <br /><br /> <asp:Label ID="Label1" runat="server" /> </ContentTemplate> </asp:UpdatePanel> </div> <div class="demobottom"></div>

Beautiful! Thanks for replying! I will give it a try!

Getting TabIndex at Server Side in Ajax 1.0 Tab Control

Dear Pankaj,

I used the following articles to solve this problem:

http://forums.asp.net/thread/1554862.aspx

I hope this article helps you with your problem!

Johan

Getting tab ID in Javascript.

I found the answer to my own question:

Here it is for others to view

alert(sender.get_activeTab().get_id());

Getting System.Web.UI.Control does not contain a definition for DataItem error on controls

Hmm this is indeed one of the weirdest bugs I've ever seen. Not the weirdest, but it's up there!

I can't for the life of me figure out why it's breaking (at least, not the real root cause). However, if you use the "simplified databinding" feature of ASP.NET 2.0 then it works. Just replace calls to DataBinder.Eval(Container.DataItem, "...") with calls to Eval("...") and then it works.

For example: <asp:Label ... Text='<%# Eval("name") %>' />

Thanks,

Eilon


That works fine, I guess it's probably better anyway from what I can gather (still getting up to speed on asp.net 2.0 from 1.1).

Thanks!

Getting Sys.ArgumentNullException: Sys.ArgumentNullException: Value cannot be null in AJAX

Hi Swami, Have you found an asnwer for this problem. I am now having the same problem. After adding validators and callout validators the page now produces the error. I remove them and the error goes away. Any suggestions?

Getting Started.........

There's some useful stuff like documentation atatlas.asp.net.

Getting Started with Scott Guthries Video and ASP.NET AJAX RC

andre_f:

I'm trying to getting started with Scrott's Video (Video - Developing ASP.NET 2.0 Applications using AJAX, fromhttp://ajax.asp.net/default.aspx?tabid=47 ).

How do I have to configure my web.config to use <asp:ScriptManager ...> (instead of <atlas:ScriptManager)? And is it possible to get his cool css file and the images?

andre_f --

Change web.config from this...

<!-- old -->
<!--
<add tagPrefix="asp" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="asp" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
-->

...to this...

<!-- new -->
<add tagPrefix="ajax" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="ajax" namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="ajax" namespace="Microsoft.Web.Preview.UI" assembly="Microsoft.Web.Preview"/>
<add tagPrefix="ajax" namespace="Microsoft.Web.Preview.UI.Controls" assembly="Microsoft.Web.Preview"/>

...and also watch out for a few other things, which I comment on in the following threads...

TagPrefix issues...http://forums.asp.net/thread/1497071.aspx

Could not load issues... http://forums.asp.net/thread/1496255.aspx

Trigger element issues... http://forums.asp.net/thread/1497134.aspx

...and also note some other syntax tweaks, (such as the mode attribute is now updatemode on the UpdatePanel).

Overall, Scott's video is good; but, it needs a little updating to reflect recent syntax changes. The code does work with a few minor tweaks, as noted above (and perhaps some I forgot).

HTH.

Thank you.

-- Mark Kamoski


andre_f:


And is it possible to get his cool css file and the images?

andre_f --

I do not know if these are available anywhere.

Howver, if you just grab a single animated gif and call it images\indicator.gif and add just a blank css with the same name as his the whole thing works fine.

HTH.

Thank you.

-- Mark Kamoski


I just found a page with some sweet indicator images:

http://www.napyfab.com/ajax-indicators/

Getting Started with ASP.NET AJAX

Hi,

you must first install the ASP.NET AJAX Extensions on your machine where it'll run. After that you can update the web.config, take a look athttp://ajax.asp.net/docs/ConfiguringASPNETAJAX.aspx, in order to make it work. Another solution would be to create a new project based upon the AJAX template and copy paste the needed parts from that web.config to that of your project.

Grz, Kris.


It's not as hard to Ajax-enable a page as you might think. I'd suggest you check out this screencast:

http://www.asp.net/learn/videos/view.aspx?tabid=63&id=81

Getting started problem.

Unless you specify otherwise, the default is for them to get updated on every action. You'll need to change the mode to conditional in the update panel if you don't want it to update every time. Then you'll need to add a trigger to the update panel to know when to update.

Ex:

<

asp:DropDownListID="ddlManager"runat="server"DataSourceID="odsManager"DataTextField="Manager"DataValueField="ManagerID"AutoPostBack="True"></asp:DropDownList>

<atlas:UpdatePanelID="p2"runat="server"Mode="Conditional">

<ContentTemplate>

<asp:DropDownListID="ddlSupervisor"runat="server"DataSourceID="odsSupervisor"

DataTextField="Supervisor"DataValueField="Supervisor"> </asp:DropDownList>

</

ContentTemplate>

<

Triggers>

<

atlas:ControlEventTriggerControlID="ddlManager"EventName="SelectedIndexChanged"/> </Triggers>

</

atlas:UpdatePanel>

Gave it try same thing.

Internet Explorer

Uknown Error

How do you debug this?

Thanks,

bob


I'd suggest using a tool like Fiddler to look at the web traffic. When doing partial postbacks, atlas cannot handle any need-to-be-escaped characters in the head element. So for instance <head><title>One & Two</title></head> would cause this "Unknown Error" exception.

Also, a server-side exception could have been thrown. Try turning off PartialRendering and see if that reveals anything.


I have found the same things when I didn't create the web page with the atlas web page template the error is very vague but I think it has to with the post back.

Try creating a new page using the atlas template and put all your code and control on the new page and see how it comes out.


Yes, agreed. Make sure that your web.config is correct (either by using the Atlas website template or by manually adding in the atlas lines)

Turned off partial rendering and everything worked just as it did before I added the update panels, refresh flashes and all.

Here is more information if it can help solve the puzzle. I am debugging this locally and using VS2005.

On the server side I have followed the code all the way out of the server. So its not on the server side but something that happens to the returned data.

I will look for the tool you mentioned as this bug has me curious.


http://forums.asp.net/thread/1370108.aspx

Got Fiddler running and its a nifty little application. I am not to sure how to make the results out.

When I clicked on my Select all button I got this message at the top which I assume it sent bytes

and read a bunch back.

Request Count: 1
Bytes Sent: 6,001
Bytes Received: 10,886

I got my error as always and tried to examine the return text. Maybe I would see something obvious. I didnt. Just dont know enough to uderstand this.

So I will post it. Any ideas?

Bob

<delta>
<rendering>..
<head id="Head1">
<title>...WebForm1..</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<style type="text/css">...atlas__delta { font-family:Lucida Console; }...TreeView1_0 { text-decoration:none; }...TreeView1_1 { color:#0000C0; }...TreeView1_2 { }...</style></head><form name="Form1" method="post" action="FileViewPage.aspx" id="Form1">...............
<panelContent id="UpdatePanel1">
<![CDATA[..
<input type="submit" name="SA" value="Select All" id="SA" style="width:89px;left: 243px; position: absolute; top: 16px" /> .. ..
]]>
</panelContent>......
</form>
</rendering>..
<hiddenField id="TreeView1_ExpandState" value="eeennunnunnunnun" />..<hiddenField id="TreeView1_SelectedNode" value="TreeView1t4" />..
<hiddenField id="__EVENTTARGET" value="" />..<hiddenField id="__EVENTARGUMENT" value="" />..<hiddenField id="TreeView1_PopulateLog" value="" />..
<hiddenField id="__VIEWSTATE" value="/wEPDwUJNTA5MzU5MTkzD2QWAgIED2QWCgIBDzwrAAkCAA8WDB4FV2lkdGgbAAAAAABAj0ABAAAAHgZIZWlnaHQbAAAAAABAj0ABAAAAHg1OZXZlckV4cGFuZGVkZB4MU2VsZWN0ZWROb2RlBQtUc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93TGV2ZWxDaGVja0JveAUgR3JpZFZpZXcxOl9jdGw0OlJvd0xldmVsQ2hlY2tCb3gFIEdyaWRWaWV3MTpfY3RsNTpSb3dMZXZlbENoZWNrQm94BSBHcmlkVmlldzE6X2N0bDY6Um93TGV2ZWxDaGVja0JveAUgR3JpZFZpZXcxOl9jdGw3OlJvd0xldmVsQ2hlY2tCb3gFIEdyaWRWaWV3MTpfY3RsODpSb3dMZXZlbENoZWNrQm94BSBHcmlkVmlldzE6X2N0bDk6Um93TGV2ZWxDaGVja0JveAUhR3JpZFZpZXcxOl9jdGwxMDpSb3dMZXZlbENoZWNrQm94BSFHcmlkVmlldzE6X2N0bDExOlJvd0xldmVsQ2hlY2tCb3gFIUdyaWRWaWV3MTpfY3RsMTI6Um93TGV2ZWxDaGVja0JveAUhR3JpZFZpZXcxOl9jdGwxMzpSb3dMZXZlbENoZWNrQm94BSFHcmlkVmlldzE6X2N0bDE0OlJvd0xldmVsQ2hlY2tCb3gFCUdyaWRWaWV3MQ9nZAVGDW6THI9ZMAOt8F2ZkeQKe/sE" />..<hiddenField id="__PREVIOUSPAGE" value="XsymgtZ3HtvnfGt9LQ8L52B8t-zJejizg0Tf_vgTyXF8FpUFSO8WPr3_2hJpwFYIpaNpoE-VfBl8eG91u-AaCg2" />..<hiddenField id="__EVENTVALIDATION" value="/wEWGwLIy+O+AgLt76bwDAKRh8TAAwKBsc6MDwLG6IjSBwLUuKhfAqf9lYkMAobsq7YFAuqN4scGApCYrZ0GArn+69UCAtzv3vAMArjY4LIPAsz0+6YPApDuzMIJApfW1roHAsbvmZMNAqXs3oEPAvy+rL4PAvPYw4oEAuLG3b8IApHRyJcBArPVloMNAv7RnfUGApuj0oUNAsqC7tEDAq+tx9EGFkvP3229IK24kd+ESHg87yuOFqQ=" />..<script type="text/javascript">..
<![CDATA[
<!--..var theForm = document.forms['Form1'\];..if (!theForm) {.. theForm = document.Form1;..}..function __doPostBack(eventTarget, eventArgument) {.. if (!theForm.onsubmit || (theForm.onsubmit() != false)) {.. theForm.__EVENTTARGET.value = eventTarget;.. theForm.__EVENTARGUMENT.value = eventArgument;.. theForm.submit();.. }..}..// -->]]>..</script>..<script src="http://pics.10026.com/?src=/External PMSI Extranet IIV2-2005/WebResource.axd?d=-RVLI4qRxFnBbbUP0wAK6g2&t=632665266792890625" type="text/javascript">..</script>..<script src="http://pics.10026.com/?src=/External PMSI Extranet IIV2-2005/WebResource.axd?d=3YLNO0nIo8sAAsr5r7kCYQ2&t=632665266792890625" type="text/javascript">..</script>..<script>..<![CDATA[<!--.. function TreeView_PopulateNodeDoCallBack(context,param) {.. WebForm_DoCallback(context.data.treeViewID,param,TreeView_ProcessNodeData,context,TreeView_ProcessNodeData,false);.. }..// -->]]>..</script>..<script type="text/javascript">..<![CDATA[<!--..var TreeView1_ImageArray = new Array('', '', '', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKp5UnG1Q9WRkUIjiQa0fCsX41&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKpyl1GvBiBrCq7nIr599jgrA1&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKp90nPO_leOeGr6YeB-46j6w1&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKp2L2-C7-brUBt1YCDiG85ZQ1&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKpxBC9yc0IxWUXrDcNqPEfDE1&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKp6zMaDyAGMnKSsEIDooF8MQ1&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKp_AyJoVG7r_EeIH6KipIKNLjskjj-MUdaxIthAoBkwTu0&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKp-JQtfXcGjRB2MvkTyATHB01&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKp2GbgFpHmfxiZXb4ROk3Huo1&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKpywT-h49MEwcly46hHsUtQjuMlatmCH_uUGJ5n-a2Sfl0&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKp5eX5-0u-kGesvTcFERKKKo1&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKp91jNxP4U5mstC37A1bkkuo1&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKpzKUsVFvYkvlJ3qsFS5rf0LgGKZ5qC2whDOlQWli-JRz0&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKp_i6cbq9P_Jgmb4XeXg-0V81&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKp3EyAzIYQwN980STkpfHX1vikcWBZ3nKqtPi0UuPuzoz0&t=632665266792890625', '/External PMSI Extranet IIV2-2005/WebResource.axd?d=vA2JhPR0S1LLkfhr2eHKp5hGxpEAqAn9A4iQSfCOkjk4ibRXzQvka8hVgSAh_HA80&t=632665266792890625');..// -->]]>..</script>..<script type="text/javascript">..
<![CDATA[
<!--...WebForm_InitCallback();var TreeView1_Data = new Object();..TreeView1_Data.images = TreeView1_ImageArray;..TreeView1_Data.collapseToolTip = "Collapse {0}";..TreeView1_Data.expandToolTip = "Expand {0}";..TreeView1_Data.expandState = theForm.elements['TreeView1_ExpandState'\];..TreeView1_Data.selectedNodeID = theForm.elements['TreeView1_SelectedNode'\];..for (var i=0;i<19;i++) {..var preLoad = new Image();..if (TreeView1_ImageArray[i\].length > 0)..preLoad.src = TreeView1_ImageArray[i\];..}..TreeView1_Data.lastIndex = 16;..TreeView1_Data.populateLog = theForm.elements['TreeView1_PopulateLog'\];..TreeView1_Data.treeViewID = 'TreeView1';..TreeView1_Data.name = 'TreeView1_Data';..// -->]]>..</script>..
<deltaPanels>UpdatePanel1</deltaPanels>..
<pageRequestManager asyncPostbackControlIDs='' updatePanelIDs='UpdatePanel1' />..
<xmlScript>..<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">..
<components />..
</page>
</xmlScript>..
</delta>

Getting start Ajax from "Atlas"

hello.

the lack of intellisense ?is a VS bug. the current workaround is to change the asp prefix of the ajax controls to something else (ex.: ajax) on the web.config file.

Getting selected data out of a ModalPopup

Now I'm thinking I may only have to write a quick client-side script that would be called via my TR's onClick event. The Repeater would render the TR's onClick to call the function along with the necessary data; the function would add that data to a ListBox back on the main form and then call the ModalPopUp's hide() method. Alas, I can't seem to get that to work either ... am I way off base here?

getting rid of the vertical scrollbar in a listbox

and heres the other weird thing -
if i wrap the whole up there in an updatepanel as such:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label2" runat="server" Text="clickhere"></asp:Label><br />

<asp:ListBox ID="ListBox1" runat="server"
AutoPostBack="True" OnSelectedIndexChanged="selectedIndexChanged"
DataSourceID="pODS" DataTextField="priority" DataValueField="priorityID">
</asp:ListBox>

<ajaxToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server"
TargetControlID="Label2" PopupControlID="ListBox1" OnPreRender="AdjustVertical"
CommitProperty="value" >
</ajaxToolkit:PopupControlExtender>
<br />

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>

now the popup wont dismiss once ive clicked it
without the update panel it does dismiss simply cause
it does a whole page refresh
but why wont it dismiss with a partial page refresh

looking forward to your answers
thanks

toy


sorry just answered my own question

forgot to commit the selectedvalue in the code behind


im getting tired...

this answer is still unresolved?

if you have any ideas i would welcome them

thanks



Getting NULL for ListBox within UpdatePanel....why?

Please note my reference above to UnselectedList should read "UnselectedItems" to match the object in the code.

Getting notified of new toolkit builds?

The Ajax toolkit is now onCodePlex.

The rss feed for releases

http://www.codeplex.com/AtlasControlToolkit/Project/ProjectRss.aspx?ProjectRSSFeed=codeplex%3a%2f%2frelease%2fAtlasControlToolkit


Thanks.

Getting nasty IE crash with Atlas EnablePartialRendering

I experience exactly the same problem. Unfortunately the behaviour is inconsistent, and I don't have enough statistics to figure out if it happens ony on specific machine and may caused by third-party tools (I use MS IE Developer toolbar and BlazingTools InstantSource)
Hi,

I wasn't unable to reproduce this issue. However if you come up with a repro, please post it in theunofficial bug list thread.

Since they just released the July CTP drop of Atlas, I will d/l it and check it out, and post if I still see it here...

Hopefully it'll just go awayWink


Well the new drop didn't make it go away.

I suspect its actually an IE JavaScript engine bug... The error seems to appear when the control hierarchy is somewhat deep...

For instance, I can consistently get an error on a link button here:

<Page>
<UpdatePanel>
<UserControl>
<IEWebControls:MultiPage>
<IEWebControls:PageView>(the 3rd of 3)
<UserControl>
<GridView>
<LinkButton>

I also suspect its got something to do with the IEWebControls multipage/pageviews... When running outside of it, things seem to work better.

Perhaps the answer is the Ensoft Atlas-based Multipage/PageView controls?


I have an issue with ATLAS crashing i.e. as well. I have tested the same script in firefox and works fine.

Basically I have a few update panels in a wizard control. I have two on one step and I have added a third on a second step. I am having a lot of trouble getting another update panel working on more than one step of a wizard control.

Before enabling 'conditional' on the updatepanel I was getting JS errors. Upon enabling this, i.e. simply crashes.


Further to this, I have just testing my script outside of a wizard control. It is still crashing, so it looks like we can rule the wizard control out as a contributor.

Getting mouse coordinates in webform

liorbrauer:

I know how to get the mouse coordinates in javascript, but I am clueless as to how to this in asp.net

There's no difference. You still need to use javascript to get the coordinates.


I have a asp:button control and an OnClick event which is ofcourse in .net and not the javascript onclick event. How do I call a javascript function through the .net event?


You add a javascript onclick event to the button. This can be done in a couple of ways: add OnClientClick within the declarative markup for the button - <asp:Button ID="Button1" runat="server" OnClientClick="getCoords()"... />, or Button1.Attributes.Add("Onclick", "getCoords()")

Great! Thanks! that really helped me, and I have another question now:

I want to send an identifier of the button itself to a function. I tried:

<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" OnClientClick="positionDialog(this)">myButton</asp:LinkButton>

but for some reason that doesn't work. What am I doing wrong?

EDIT:

I found out, i used this.id

but that was no good for me. I have a Panel control under the button, and I want to send the identifier of the PANEL to a function when the button is clicked (all in JS), but I am not sure how. The thing is, this whole thing is part of a UserControl that is used several times in the same page, so each instance of the Panel in the UserControl has a different id in the HTML output (Journal1_Panel1, Jounral2_Panel1, etc.)

Any ideas?


If you have another question, you should start another appropriately titled thread. If the panel is the parent container to the button, then this.parentNode.id should reference it.

getting modalpopup to work

Got it working.

Getting Method 500 Error with CascadingDropDown -VB

Hi Viking,

Status code 500 indicates that a error occurs when your server is processing the request. To solve it, the best idea is to debug through relevant code.

Another option is useFiddlerto find out the cause of the problem. Theactual error message is returned aside with the response with statuscode 500, you can use Fiddler to find it out.

Getting JavaScript include to properly refresh

Hi,

To register client script in partial postback scenario, please use ScriptManager.RegisterClientScriptInclude method.

Hope this helps.


In order to call a javascript function on every partial update, you need to add a page loaded event handler using the page request manager:

http://ajax.asp.net/docs/ClientReference/Sys.WebForms/PageRequestManagerClass/PageRequestManagerPageLoadedEvent.aspx

I hope this helps.


This morning I came upon an approach that avoids the issue and will provide more long term flexibility.

Instead of embedding the stock quote HTML via a JavaScript include, I am making a HTTP request for the stock quote HTML in the Page_Load event. When the UpdatePanel refreshes, I now get the stock quote data on the server side and paste it into a Literal control for display on the client. This will allow me to also cache data on the server side as desired to reduce the traffic to the external provider.

Thanks for your help.

Getting JavaScript Error in IE 6 but working fine in FireFox

No need to look into that issue.. there were some other javascript on my page that is casuing the behaviour.

sorry for that

Wink [;)]

Getting it to run on a virtual server

Ask you provider to install the ajax toolkit and apart from that you can add ajax extension to your website


Yes you can use Ajax without installing the ajax extensions.

You will have to copy System.Web.Extensions.dll and System.Web.Extensions.Design.dll assemblies to the bin folder of your web application.


perfect thank you very much

Getting IsPostBack as false with LinkButton

Can you post your source code?

Why are you checking for IsPostback: are you really trying to determine if it's a postback vs no postback, or whether it's a postback vs an asynchpostback? If it's the latter, useScriptManager.GetCurrent(Page).IsInAsyncPostBack instead.


http://www.asp.net/learn/ajax-videos/video-173.aspx