Showing posts with label client. Show all posts
Showing posts with label client. Show all posts

Wednesday, March 28, 2012

How do i use Tabs in Ajax in asp.net application..

Hi, i have a asp.net web application which is production... and the client wants us to display the data using the userid... right now i am using a datagrid in a simple aspx page.. but since the user has asked for that request.. i want to have 5 (tabs each for a user Id) and then display the datagrid on it... how can i do this is an existing aspx page.

I have downloaded the ajax tool kit and i dont know from where to start... by data grid is simple... just displaying the data using.. a sql query and there are few links in the datagrids to navigates to other pages...

So can I use Ajax just for one page,,, and is there anything that i need to know that will hamper production when using Ajax..

any help ,ideas and code will be greatly appreciated

Regards

Karen

You can easily only use ajax on one page, and creating the tab thing should be quite simple. There is nothing that will tamper production, since ajax is essentially an extra dll that goes in the bin folder, and a couple of additions to web.config. If I was you I would just go ahead and get my feet wet. There are some excellent getting started tutorials on this site. Just click the Ajax menu at the top of the page.

Good luck!

/Klaus


Thank you Klaus i will look into it. can you pls give me some link to it..

Regards

Karen


Hi,

Thank you for your post!

It seems that you are really a newbie to AJAX and javascript,this is a good start point for your learning:ASP.NET AJAX Roadmap

And this is a good point to start with Toolkit:http://www.asp.net/ajax/ajaxcontroltoolkit/samples/

And in my opinion, <ASP.NET AJAX in action> is a decent book to learn ASP.NET AJAX.

If you have further questions ,let me know.

Best Regards,


Jin,

Thanks for the link... and yeah i am newbie to Ajax and javascript... i had worked on tabs when i was working on VB.6 and then it was so easy then and that was 3 yrs ago.

regards,

Karen

How do I recieve a JavaScript object as a webmethod parameter?

I create a custom JavaScript object on the client side attempted to send to a webmethod and I kinda got it - but do not know how to get the date. The test method looks like this:

[WebMethod]
public string TestMethod(Object obj)
{
return "test";
}

So how can cast this in to the right object to access the data? I can see the contents if I watch it but don't know how to cast it to an object I can use it

Assuming your javascript object is something like the following

{index:-1,fileId:-1,fileExt:\"xls\",issueDate:\"1 Jan 2007\"}

you can create a structure in your serverside code to handle it

Public Structure Doc
Public index As Integer
Public fileId As Long
Public fileExt As String
Public issueDate As Date
End Structure

<WebMethod()> _
Public Function SaveDocs(ByVal docs As Doc()) As Doc()


One more question - if you don't mind:

If my JSON contains an Array - Can you tell how to make that happen? :


My BO:

 [Serializable]public class Supplier : Base {public string Name {get;set; }public string Phone {get;set; }public string Fax {get;set; }public string Website {get;set; }public string Status {get;set; }public Site Site {get;set; }public DateTime Since {get;set; }public Array Contacts {get;set; }public Supplier() {this.Site=new Site();this.Contacts =new Member[0]; } }

Member is also another Object.

My JSON looks something like:

Supplier = {"ID":-1,"Name":"","Phone":"","Website":"","Site":{"Address1":"","Address2":"","City":"","State":{"Name":"","Abbreviation":"","ID":-1},"ZipCode":""},"Contacts":[]};

Its the Contacts that is tripping me up.


Asp.net ajax does the trick for us, I mean the serialization/deserialization.


But for some reason it not filling all the objects - I check the JS object prior to calling the webmethod and the fields are populated but when it casted in the server object - some properties are not filled. Also, my other question is how to pass the array object that is a property of the JS object.


My mistake - I was expecting to receive the parent object and passing the child.

How do I know the AJAX load is complete?

I have several webservice proxies set up and some event wiring that is occurring in the Application.Load client side Ajax event. Is there a property somewhere that I can query to determine if the loading of all Ajax controls and initialization is setup and complete.

I have a client side event that displays a modal popup using a WebService proxy. But when the users click on the button before the Ajax initialization is complete there is a script error. Right now I am checking typeof( WebService.Proxy) to "undefined" to know whether I should execute the method, but a variable I could query would be much better.

Would it be preferable to disable the button by default -- then in app load, enable it?


That is a good suggestion. I could use that method in some situations. However, some of my events are mouseover events and link click events. There will be several on the page and it would be beneficial to have a single interface to consistently determine if I could execute my event script. From the user experience side, most users won't click a button until Ajax has finished loading anyway and I'd hate to distract them with UI elements flickering when they are activated.

In some cases, I would like set a timeout that could poll the app load complete bool and continue firing the event.


I just noticed in Beta 2 the external script references are loaded asychronously. This presses my need for a "done loading javascript file" message, or do you suggest putting this "check" in each javascript object file?


The way the asychronous loading feature is designed, you can be assured that all controls and instantiated and initialized by the time you get the Sys.Application object's "load" event. It is during the processing of the "init" event that all the asynchronous loading work is completed. To ensure that a piece of your code runs AFTER this, you can do the following:

Sys.Application.add_load(function() { anotherFunctionCall(); });

The code above ensures that you can run something with the confidence that all the controls, scripts, etc. have been loaded and initialized.


Preferably you would hookup your event handlers from pageLoad (aka app load). That way, if the user does something like mouse over before the page is ready, nothing happens. No need to check for something being loaded or not.


Thanks, that makes sense. I'm trying to use the extender style javascript object to wire up the event handlers and I think it is going to work out well.

How do I invoke a suitable event on the client?

I have two TextBoxes above a GridView. The GridView is wrapped in an UpdatePanel and both TextBoxes trigger an ajax GridView refresh OnTextChanged.

This is my problem. The user may sometimes leave nothing in a TextBox - when that happens I assume they mean zero, so I want to put the value of '0' back into the TextBox (which the user has removed, by deleting the entire content of the TextBox). See the javascript: restoreTextBox() function below. What event is available for me to do this and can I just invoke the event or do I need to inherit something. I have tried beginRequest() or pageLoaded() but nothing happens.

PS: The txtAssetPc_TextChanged() server-side method is working fine to update the GridView. I just want to know how I can use a suitable client event.

aspx Code only below (the server code is missing as it is not relevant to this problem).


<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
<Services>
<asp:ServiceReference Path="~/RedirectService.asmx" />
</Services>
</asp:ScriptManager>
<asp:ValidationSummary ID="vsFunds" runat="server" ValidationGroup="TextPC" DisplayMode="BulletList" ShowSummary="true" /><br />
Equities ≥<asp:TextBox ID="txtEquities" runat="server" Text="0" CssClass="text" MaxLength="3" ToolTip="Enter minimum percentage value of Equities (0 - 100)" OnTextChanged="txtAssetPc_TextChanged" AutoPostBack="true" />% <asp:RangeValidator ID="rvEquities" ControlToValidate="txtEquities" runat="server" ErrorMessage="Valid range for Equities is 0-100" Type="Integer" MinimumValue="0" MaximumValue="100" ValidationGroup="TextPC" /><br />
Fixed Income ≥<asp:TextBox ID="txtFixedIncome" runat="server" Text="0" CssClass="text" MaxLength="3" ToolTip="Enter minimum percentage value of Fixed Income (0 - 100)" OnTextChanged="txtAssetPc_TextChanged" AutoPostBack="true" />% <asp:RangeValidator ID="rvFixedIncome" ControlToValidate="txtFixedIncome" runat="server" ErrorMessage="Valid range for Fixed Income is 0-100" Type="Integer" MinimumValue="0" MaximumValue="100" ValidationGroup="TextPC" />

<asp:UpdatePanel ID="upAssetExposure" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="gvAssetExposure" runat="server" AutoGenerateColumns="False" DataKeyNames="PensionFundID"
AllowSorting="True" AllowPaging="True" PageSize="50"
OnRowDataBound="gvAssetExposure_RowDataBound" OnPageIndexChanging="gvAssetExposure_PageIndexChanging" OnSorting="gvAssetExposure_Sorting" >
<PagerSettings Mode="NumericFirstLast" />
<Columns>
<asp:BoundField HeaderStyle-CssClass="ResultsHeading" ItemStyle-CssClass="tdCol32" NullDisplayText="N/A" DataField="FundName" HeaderText="Investor" SortExpression="FundName" />
<asp:BoundField HeaderStyle-CssClass="ResultsHeading" ItemStyle-CssClass="tdCol12" NullDisplayText="N/A" DataField="TotalFundAssetsSterling" HeaderText="Total Fund Assets (GBP)" SortExpression="TotalFundAssetsSterling" DataFormatString="{0:GBP ###,### m; N/A}" HtmlEncode="False" />
<asp:BoundField HeaderStyle-CssClass="ResultsHeading" ItemStyle-CssClass="tdCol12" NullDisplayText="N/A" DataField="Equities_Percent" HeaderText="Equities (%)" SortExpression="Equities_Percent" DataFormatString="{0:##; N/A}" HtmlEncode="False" />
<asp:BoundField HeaderStyle-CssClass="ResultsHeading" ItemStyle-CssClass="tdCol12" NullDisplayText="N/A" DataField="FixedIncome_Percent" HeaderText="Fixed Income (%)" SortExpression="FixedIncome_Percent" DataFormatString="{0:##; N/A}" HtmlEncode="False" />
</Columns>
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="txtEquities" EventName="TextChanged" />
<asp:AsyncPostBackTrigger ControlID="txtFixedIncome" EventName="TextChanged" />
</Triggers>
</asp:UpdatePanel>

<script type="text/javascript">
var aTxt = ['<%txtEquities.ClientID%>','<%txtFixedIncome.ClientID%>'];
function restoreTextBox(){
for (var e=0; e < aTxt.length; e++){
var txtBox = document.getElementById(aTxt[e]);
if (txtBox.value == '')
txtBox.value = '0';
}
}
</script>

Just add onblur="restoreTextBox();" to your textboxes.

Monday, March 26, 2012

How do I consume a JavaScript object on the main page in an ASCX control?

Hello,

I am using the ASP.Net AJAX client side libraries, and I want to be able to write Web User Controls (ASCX) that I dynamically load into my site. I want to be able to have a global object in my main page that is used by each ASCX control that is loaded into the page. As soon as the ASCX control is loaded, I want it run its script to call a method in the global object.

I am having a "timing problem" with my code. In order to use the ASP.Net AJAX libraries (like the "Type" object to register namespaces, etc.), I have placed the JavaScript on the main page in the "pageLoad" function.

Right now I am using the "setTimeout" function in my ASCX script to delay it a few seconds so I can be sure that the script in the main page has completely loaded before I make a call to the global object.

Is there any way that I can ensure that the script on the main page has loaded and stop using the "setTimeout" method in my ASCX script?

Here is the markup for my main page…

1<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="StartupScriptTest._Default" %>23<%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>45<%@dotnet.itags.org. Register src="WebUserControl1.ascx" tagname="WebUserControl1" tagprefix="uc1" %>67<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">89<html xmlns="http://www.w3.org/1999/xhtml" >10<head runat="server">11 <title>Untitled Page</title>12 <script type="text/javascript">1314 var x = null; // <- I want to access this in the ascx control after pageLoad is finished1516 function pageLoad()17 {18 Type.registerNamespace('MyNamespace');1920 MyNamespace.MyClass = function()21 {22 MyNamespace.MyClass.initializeBase(this);23 }2425 MyNamespace.MyClass.prototype =26 {27 sayHello : function(message)28 {29 alert(message);30 }31 }3233 MyNamespace.MyClass.registerClass("MyNamespace.MyClass");3435 x = new MyNamespace.MyClass();36 }3738</head>39<body>40 <form id="form1" runat="server">41 <div42"ToolkitScriptManager1" runat="server">43 </cc1:ToolkitScriptManager>44 </div>45 <uc1:WebUserControl1 ID="WebUserControl11" runat="server" />46 </form>47</body>48</html>49

…and here is the markup for my ASCX control…

1<%@dotnet.itags.org. Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs" Inherits="StartupScriptTest.WebUserControl1" %>2<script type="text/javascript">34 setTimeout('x.sayHello("hello")', 1000); // <- Any way to not use 'setTimeout'?56<> 

Thank you for your help,

Dave

hello.

i'll just enumerate the things i think that are important:

1. do you need to define the class in the load event? I think that you can put it outside, in an external file and load it so that it's available at the begining of the page

2. are you wrapping any html control or behavior that exists on the page? if not, then i think that you can also insert your x = new class() at the begining of the class declaration.


Hi restating what Luis has said, you gotto implement something like this.,

Create a .js file consider sample.js.

Put this code inside

Type.registerNamespace('MyNamespace');

MyNamespace.MyClass = function() { MyNamespace.MyClass.initializeBase(this); } MyNamespace.MyClass.prototype = { sayHello : function(message) { alert(message); } } if ( typeof (Sys) !== 'undefined' ) Sys.Application.notifyScriptLoaded();

register this sample.js in the scriptmanager.


<asp:ScriptManager ID="ScriptManager1" runat="server" >
<Scripts>
<asp:ScriptReference Path="../../client_scripts/sample.js" />
</Scripts>
</asp:ScriptManager>

Then create the global variable inside your function. var x = new MyNamespace.MyClass();

How do I catch this error?

I have a simple client side webservice call that has a timeout and error handler defined:

TickUpdates.TickUpdate(tokenKey, SucceededCallback, FailedCallback, FailedCallback);

if I am not connected to the web, I get the following error. How can I capture this gracefully ?

[Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::http://localhost:45000/ScriptResource.axd?d=BSklnKRUU-3ZDmAWzNvjWRmHZJsJaTmhatiwatSzdV-n5b762_YnBv0exMpD6psRGreUx_ficbFeVQuAjTH012_sGHF6tKUojM03BRoiazs1&t=633084179322613693 :: Sys$Net$XMLHttpExecutor$get_statusCode :: line 4166" data: no]
http://localhost:45000/ScriptResource.axd?d=BSklnKRUU-3ZDmAWzNvjWRmHZJsJaTmhatiwatSzdV-n5b762_YnBv0exMpD6psRGreUx_ficbFeVQuAjTH012_sGHF6tKUojM03BRoiazs1&t=633084179322613693
Line 4166

In my case, it's happening because I'm trying to make a call to a PageMethod on a page that required authentication, but my authentication has timed out. In IE, I get an error with status 12030, but Netscape gives me the error above. This is a showstopper if I can't handle it gracefully via the FailedCallback handler.

Any ideas?


OK, so I figured out what's going on. In the Microsoft library, there's the following method:

function Sys$Net$XMLHttpExecutor$get_statusCode() {
/// <value type="Number"></value>
if (arguments.length !== 0) throw Error.parameterCount();
if (!this._responseAvailable) {
throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_statusCode'));
}
if (!this._xmlHttpRequest) {
throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_statusCode'));
}

return this._xmlHttpRequest.status;
}

The problem with this is that Firefox throws an exception if the status isn't available, which is the case if you're offline, or, in my case, trying to access a PageMethod on a page requiring authentication after your logon has timed out. Throwing an exception is the W3 standard, as shown athttp://www.w3.org/TR/XMLHttpRequest/. Here is the related text...

status of type unsigned short, readonly
If the status attribute is not available an INVALID_STATE_ERR exception must be raised. It must be available when the state is receiving or loaded. When available, it must represent the HTTP status code (typically 200 for a successful request).

Its initial value must be 0.

So, what does this mean to us? It will require that Microsoft trap the exception thrown when the status isn't available, and then called the FailedCallback method so that we can handle it.


Here's my workaround. You can read the comments to know what I'm doing. With this fix to the get_statuscode method, I can then handle the 999 error code in my FailedCallback function. I hope this helps!

<script language="javascript">
//MS Ajax isn't handling getstatus exception, so i have to insert my own try/catch
//I'm doing it by creating a new prototype method... instead of rewriting the whole
//function, i'm simply taking the text of the current function, changing the name
//via replace, and changing the line accessing status to have try/catch wrapped around
//it. If the status call errors out, i'm returning error 999. You can return whatever you
//want.
//PS. I'm no javascript guru, so forgive me if I didn't use the most efficient
//code for creating a replacement function with the fixes.
//get the current function text
var funcText = Sys$Net$XMLHttpExecutor$get_statusCode.toString();
//our new function will have 'Patched_' appended to the start of the existing function
funcText = funcText.replace('Sys$Net$XMLHttpExecutor$get_statusCode', 'Patched_Sys$Net$XMLHttpExecutor$get_statusCode');
//replace status access with same line, except with try/catch block wrapped around it
funcText = funcText.replace('return this._xmlHttpRequest.status;', 'try {return this._xmlHttpRequest.status;} catch(e) {return 999;};');
//create new function using eval... to use funct = new Function or func = function() {...},
//I'd have to take the funcText and strip the function line and bracket from the beginning and the
//end. I could have done it by removing the first and last lines, but I did it this way instead.
eval(funcText);
//have the prototype method point to the new function instead of the old one
Sys.Net.XMLHttpExecutor.prototype.get_statusCode = Patched_Sys$Net$XMLHttpExecutor$get_statusCode;
</script>


I'm getting this error too in Firefox 1.0.3, but I'm not using any authentication. The oddities are:

1.) The error does not occur during the first asynchronous postback. The first one succeeds, but any subsequent async postbacks give the same error (pointing to the same Sys$Net$XMLHttpExecutor$get_statusCode() function).

2.) The error does not occur when I am using VS2005 in debug mode with a breakpoint at the codebehind event hander that handles the postback. When the code stops at the breakpoint, and I let it continue, the async postback succeeds.

Why would it work in debug mode with a breakpoint, but not in debug mode without breakpoints? Why would it succeed on the first postback, but not any subsequent ones?


This is just a weak opinion, but it sounds like a timing issue. I don't know why, but the pause that's introduced because of the breakpoint may enable it to complete, whereas without the pause it fails for some reason.

The issue I've documented definitely happens for reasons other than authentication. I hope I didn't give the impression that it's the only, or even primary, reason :).

John


FYI, MS has confirmed it's an issue, and is going to try to fix it in the Orcas release. In the meanwhile, they said the workaround I posted seems to be OK (although I'm sure they didn't have time to test it thoroughly - use at your own risk :)).

John


I thought of that, but inserting a System.Threading.Thread.Sleep(2000) call in the codebehind handler doesn't fix it.

I jumped the gun with this post anyway. As indicated athttp://ajax.asp.net/docs/BrowserCompatibilityForASPNETAJAX.aspx, UpdatePanels aren't officially supported for Firefox 1.0.x. Still, shouldn't Microsoft render in such a way that this browser uses synchronous postbacks instead of attempting asynchronous ones?


Then again, I'll have to chalk this one up to my system configuration. I just tried the same code using FF 1.0.3 on a different machine, and everything works as expected. Will have to try it in a production environment to see if the problem isn't coming from VS2005 and its embedded web server.


So it really is a confirmed issue? FYI I tried your fix. Whereas it did stop the error from popping up in the FF javascript console, it did not cause the second async postback to proceed. This is leading me more into thinking the problem was with my system configuration.

Saturday, March 24, 2012

how do I access data on client side with ajax

hello. I have an mdb that I want to use to popluate some textboxes with out postback or waiting for IE to reload.

I am using easylist box that gives me the record ID but I want to use that ID to pull data from the MDB with out reloading the IE.

can someone link me in the right direction?

You should issue XmlHttpRequest on some Javascript event (say, button click or focus removed or whatever), which will pass your ID to the server side and will get the response, which you should dynamically insert into the TextBox you want (javascript, client side again).

This is th schema in general.

You can find a lot of free books about AJAX on the net, ex.: http://paperolli.com/default.aspx?keyword=ajax


thanks!!!

How clientscript member Authentication last the whole browse session than a page

I use asp.net ajax client method to do member Authentication

Sys.Services.AuthenticationService.login(username.value,password.value, true ,null,null,null,null,"User Context");

It successed in current page. but when I redirecit to another page, the Authentication dissapeard

How clientscript member Authentication last the whole browse session

I found I have wrong setting in my config files

How catch updatepanel in client?

When back button pressed in browser, updatepanel updates again...

I need catch updatepanel content in client...

can i?

I have an UpdatePanel that update in client with delay. i need catch content of this UpdatePanel in client, because this content is shared in all pages.

Best sample for resolving this problem is Yahoo Mail... update panle update all contet in all CallBack... i need catch contents in client...

Please help me... tnx


i need helpConfused

plz......

How can to get a Dataset from client in Atlas?

When I return a dataset in server and get result in client, there's always a error like this

"System.InvalidOperationException - a circular reference was detected while serializing an object of type 'System.Globalization.CultureInfo'".

Does Atlas not support get a dataset ?

Add the Preview verison to work with dataset, datatables etc.


Amit
Are you referring to the May Futures and the Microsoft.Web.Preview.dll?
If so, where is the support in the May Futures for Client access to datasets/datatables?
I looked at the documentation for the Futures and didn't see it.
Thanks for your help...
Glenn Michael


No I was talking about the Ajax January CTPhttp://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en you download it from this link.

Wednesday, March 21, 2012

How can i stop my client side list view from disappearing every time i poll a web service?

I've written a page that displays some live information that is provided by a web service and then bound to a client side list view (the binding follows this example:http://atlas.asp.net/docs/Walkthroughs/GetStarted/databind.aspx). This page is updated with a client side timer that ticks every 3 seconds. The idea is that the page updates seamlessly as the web service is polled every few seconds.

This almost works, but there seems to be a delay whilst the web service is fetching the information, during which no list view is rendered. This means that every 3 seconds the table disappears momentarily, and then the new information is shown correctly. This leads to the screen looking "flickery".

My question is how can i prevent this flickering from appearing whilst the data is retrieved from the web service?

Many thanks

-Matt

Bonus Information:

Here are some code examples to make this a bit clearer. This is the code that updates the page and retrives the information from the webservice:

function PageRefreshTick() { LotItemDataService.GetInProgressLots(inProgressCallComplete); }function inProgressCallComplete(result) { document.getElementById("InProgressLotsItemListView").control.set_data(result); }
 And here are the relevant parts of the markup: 
<asp:Content ID="Content2" ContentPlaceHolderID="Zone1Content" runat="server"> <timer id="PageRefreshTimer" interval="3000" enabled="true" tick="PageRefreshTick" /> <atlas:ScriptManagerProxy id="ScriptManagerProxy" runat="server"> <services> <atlas:ServiceReference Path="LotItemDataService.asmx" /> </services> </atlas:ScriptManagerProxy><div class="ListView"> <div id="InProgressLotsItemListView"> </div> <div style="display: none;"> <div id="InProgressLotsItemListView_layoutTemplate"> <div id="InProgressLotsItemListView_layoutTemplate_templateItem"> <table border="0"> <tbody id="InProgressLotsItemListView_layoutTemplate_LotItemParent"> <tr id="InProgressLotItem" style="height: 28px; width: 599px;"> <td style="height: 28px;"> <table cellpadding="0" cellspacing="0"> <tr> <td style="width: 16px;"> <img id="InProgressIsTracked" alt="Tracked" src="../App_Themes/BCADirect/images/icons/icontracker.gif" /> </td> <td style="width: 40px;"> <a id="InProgressLotId" class="BidSessionLink"></a> </td> <td style="width: 10px;">   </td> <td style="width: 40px;"> <img id="VehicleImage" alt="VehicleImage" /> </td> <td style="width: 10px">   </td> <td style="width: 250px;"> <table> <tr> <td> <a id="InProgressCompleteDescription" class="BidSessionLink" /> </td> </tr> <tr> <td> <label id="InProgressRegistration" class="BidSessionLabel" /> </td> </tr> </table> </td> <td style="width: 10px;"> </td> <td style="width: 300px;"> <table> <tr> <td> <label id="InProgressHighestBidder" class="BidSessionLabel" /> </td> </tr> <tr> <td> <label class="BidSessionLabel">Current price: </label> <label id="InProgressCurrentPrice" class="BidSessionLabel" /> </td> </tr> </table> </td> <td style="width: 10px;">   </td> <td> <label class="BidSessionLabel" id="PlaceBidLabel">Test</label> </td> <td style="width: 100px; height: 100px;"> <label id="InProgressTimeRemaining" class="BidSessionLabel" /> </td> </tr> </table> </td> </tr> </tbody> </table> <a id="InProgress_layoutTemplate_HyperLink1" href="http://www.google.com" class="BidSessionLink"> </a> </div> </div> </div></div> <listView id="InProgressLotsItemListView" itemTemplateParentElementId="InProgressLotsItemListView_layoutTemplate_LotItemParent"> <layoutTemplate> <template layoutElement="InProgressLotsItemListView_layoutTemplate" /> </layoutTemplate> <bindings> <binding dataContext="waitingLotsItemDataSource" dataPath="data" property="data" /> </bindings> <itemTemplate> <template layoutElement="InProgressLotItem"> <image id="InProgressIsTracked"> <bindings dataPath="IsTracked" property="visible" /> </image> <hyperLink id="InProgressLotId"> <bindings> <binding dataPath="Id" property="text" /> <binding dataPath="VehicleDetailsUrl" property="navigateURL" /> </bindings> </hyperLink> <hyperLink id="InProgressCompleteDescription"> <bindings> <binding dataPath="CompleteDescription" property="text" /> <binding dataPath="VehicleDetailsUrl" property="navigateURL" /> </bindings> </hyperLink> <label id="InProgressRegistration"> <bindings> <binding dataPath="Registration" property="text" /> </bindings> </label> <label id="InProgressTimeRemaining"> <bindings> <binding dataPath="TimeRemaining" property="text" /> </bindings> </label> <label id="InProgressHighestBidder"> <bindings> <binding dataPath="HighestBidUserName" property="text" /> </bindings> </label> <label id="InProgressCurrentPrice"> <bindings> <binding dataPath="CurrentPrice" property="text" /> </bindings> </label> <label id="PlaceBidLabel"> <bindings> <binding dataPath="BidNowText" property="text" /> </bindings> </label> </template> </itemTemplate> </listView></asp:Content>

Although i didn't receive any replies through this board, I received a number of emails from my companies .net community, including this one:

The problem with the list view is a known issue with the Atlas team (not that they seem to be actively trying to fix it). I am currently working n a custom list view to try and reduce the flickering.

So there are couple of options open that you could try :-

1.Buffer your data and only redraw the list view when there is a delta in your data reducing the flicker.

2.Use the XML script data binding but draw the list view manually using atlas client side JavaScript (Here at HMV I manually create the list view using divs or a table due to the flickering issues).

3.If you are not bound to a Atlas then try http://www.telerik.com/ who has some awesome ajaxable controls that you can use.

I tried rendering the output myself with JavaScript to the innerHTML of a div tag, and this indeed fixed the problem. However this in turn introduces its own set of problems further down the line as I wanted to use animations, and using this method I have no components in the xml portion of the markup.

I guess until the underlying listview big is fixed, there is no way to move forward with this?

-Matt

How can I see ModalPopup js code ?

I'm a big fan of the modal popup extender and I'm trying to implement it using plain DHTML since my client have no asp.net server and I'm using classic ASP.

As you know, there is a classic IE annoying bug with COMBO BOXES. They stay on top of every div, without respecting the z-index layout.

I'm interested in learning how the Ajax Control Toolkit programmers handled this situation so I can do the same.

I can't just hide the combos, since I'm usiing a transparent Modal Background and I wish I could see the combos BEHIND the Modal Background.

Thanks!

Hi,

You can download the source codehere. Its implementation can be found in ModalPopupBehavior.js file.


thanks

How can I make the collapsible panel extender NOT remember client state on post back?

I see one of the "features" of the collapsible panel extender is that it remembers it's client state after a post back, but I don't want that behavior after a successful post back. I have a form to fill out inside the collapsible panel and after post back, I want the panel to close as an indication that it was completed.

I've tried turning view state off on the collapsible panel and loading the change onPreRender and nothing seems to work. Is this possible?

Hi,

You can setMyExtender.EnableClientState = false; beforeOnInit (i.e. inOnPreInit) to disable ClientState. You could also leave ClientState enabled and manually close the panel when you want withMyExtender.Collapsed = true; MyExtender.ClientState = true.ToString();.

Thanks,
Ted