Showing posts with label load. Show all posts
Showing posts with label load. Show all posts

Wednesday, March 28, 2012

ASP.NET AJAX Documentation offline don;t work correctly.

Hi.

I downloaded asp.net ajax documentation and do instructions in read me for installation and configuration. but my explorer (IE) don't load pages of it and an error accured during loading.it is like this:

_______________________________________________________________________________________________

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 96:
Line 97: <!-- Auth, membership, profile, providers sections all custom and must be kept for now. -->
Line 98: <authentication mode="Forms"/>
Line 99:
Line 100: <!-- The membership element is for some of our custom samples that use membership. -->


Source File:D:\Learning\AJAX\AspNet_AJAX_Documentation\web.config Line:98

________________________________________________________________________________________________________

I installed visual studio 2005 and asp ajax extension and asp.net 2 and iis and other that required.

Please help me.

Thanks.

Looks like there is something wrong with the configuration file, did you try this steps:

http://alpascual.com/blog/al/archive/2006/10/24/Manually-upgrading-from-Atlas-to-ASP.NET-2.0-Ajax.aspx

Monday, March 26, 2012

Asp.net Ajax Accordion SelectedIndex Event

Hello. Im trying to catch the selected index property of an accordion control and then store it into a session variable that I can then load later on in my application. Anyone have any suggestions on how to make this happen...Thanks in advance.

Here you go. On postback, just grab the value of the textbox and assign it to a session variable. Some of the javascript is for dealing with finding form objects when using a master file.

/*** Code Behind ***/
for (int i = 0; i < YourAccordionName.Panes.Count; i++)
{
YourAccordionName.Panes[i].HeaderContainer.Attributes.Add("onclick", "AssignIndex(" + i.ToString() + ")");
}

/*** Source View ***/
<asp:TextBox
ID="txtAccordionSelectedIndex"
runat="server"
style="background-color:#FFFFFF; color:#FFFFFF; border:solid 0px #FFFFFF"
Text="-1" />

<script language="JavaScript">
<!--
function AssignIndex(val)
{
document.forms[0].<%= txtAccordionSelectedIndex.UniqueID%>.value = val;
}
//-->
</script>

Hope that helps.

Saturday, March 24, 2012

asp.net ajax ,load html from other page

dear,
how do we load html from other page and display it in modal popup?

Something similar to this :
http://www.e-magine.ro/web-dev-and-design/36/moodalbox/
or
"Select Tags" feature when you write new post in this forum.


from me,
Juna

Hi, It is simple!

Use Iframe in ModalPopup can do this!

If you have further question,let me know.

Best Regards,

ASP.Net 2.0: Does using an UpdatePanel reduce back-end server load?

Hi there,

I have been experimenting with the AJAX Extensions for a while, and I have been looking at performance and other related characteristics of AJAX-izing my controls.

One question that came to mind is whether an AJAX-enabled control can reduce the back-end processing load. It might have been published somewhere before, so I apologize for the repeat in that case.

I noticed that when the client causes an AJAX postback through an UpdatePanel, it seems that the server would reload the entire web form and all its components/controls, but just sends the new UpdatePanel content back to the client. While this most certianly reduces egress, the back-end processing cost is not reduced. And with the help of AJAX controls, people tend to put more content on the same page. And in an obscure way, it actually increases server load, because the cost to refresh a portion of the page is computationally equal to a full refresh of the page, which is now more expensive because we put more content in a single page (i.e. more DB hits, etc).

I reckon that there might be documented ways to indicate that a custom control is somewhat "independent" in that a refresh does not require new data outside of the control itself (e.g. a custom control that just updates the current time every time the user clicks a button), but I haven't found any yet. Ideally, this control can live in a complicated page that requires several DB hits to refresh, but it would be great to have a way where a refresh postback to this AJAX control would cause the server to only execute the code of this control, and not re-process the entire page and incurr several extra DB hits.

If anyone knows of any such tricks or guidelines, I would really appreciate it if you could share. :-)

Thanks in advance,
- K.

hello.

well, the only way you have to build controls that integrate into ASP.NET and that are refreshed without full postbacks is to use the ICallbackEventHandler interface that was build into ASP.NET. btw, I'm not sure that you'll be gaining much by using this approach, but it exists.

regarding your remarks, what I can say is that web built AJAX pages will have most of their load in the client side, and will only use web services (or handlers) to get its data from the server side. This means that you'll have lots of JS to write, but again, that is why AJAX has a J, right?


Yes the UpdatePanel does not reduce the Server Load. Instead it offloads the data transfer of the wire and you should properly use it. To create more scalable application you can choose the Cient Centric Development Model but in that case you may have to write quite a lot of JavaScript depending upon the applicaiton you are building.

Regarding the ICallback of the Control also executes the full life cycle of the page. Moreover it only supports string for request/response as there is no serializer which does not do the conversation which is the case of Asp.net Ajax.


Thank you Kazi, I think this concurrs with my thinking and I appreciate your help.

However, others please chime in if you have other comments or nifty tricks that I can use. Smile

Thanks,
- K.

asp.net 2.0, gridview, ajax - IE6 slows WAY down

Hey all,

I've got a working .net 2.0 web app. I have page which has a table on top with 6 html dropdowns and textboxes. When you first load the page all you have is the html table and controls. Gridview.Visible=false until they submit a search.

You select values from those and then submit which populates a gridview below the table. This page works fine. I then wanted to add some ajax functionality to the page. All i did was add a script manager to the page and then wrap everything else in the page in an update panel. Now when ever i try to run a search, IE is basically locked up for a minutes before i can see any results. EVen when i am only returning a single record, IE is locked up.

Firefox is a little better...takes about 5-10, still too long for a single record, but the browser isnt locked up and thats's still a lot faster then IE. Prior to adding the ajax controls to the page, it loaded up in IE/FF in a second.

I have some other pages where i added ajax controls and they work ok. But I have one other page like this one, and that one slowed down to a crawl as well. I tried this on another computer with IE6 and it did the same thing.

Does anyone know why this is happening and if/how i can correct this?

Thanks

Set the UpdateMode to Conditional... that should improve things a bit. (See:http://www.asp.net/learn/ajax-videos/video-177.aspx for more information)

-Damien

Wednesday, March 21, 2012

ascx pages in tabs, tabs positioning with tabseparator.

How to load an ascx page into the tabs.

Does Ajax tabcontainer has any field something like "tabseparator" with which i can place few tabs on left and few on right side of the page?

Hi,

You can use the following code to load UserControl into a tab.

Control uc = Page.LoadControl("relative path to the .ascx file");

tabPanel.Controls.Add(uc);

And as far as I konw, there is no tabSeparator currently.


Well, its a different story... am writing a custom tab thru a class library which would get the configuration of tabs and their content from other files...

and this classlibrary would give me a final builded tab control, which i would add to my page.

so how to make the same page.loadcontrol(path of file) in class library


You can use a path relative to the root folder (a path starts with tilde, e.g., ~/.... ). Then no matter on which page is control is added, it will be able to find the user control.