Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Wednesday, March 28, 2012

Postback in FF

Hi All,

I have used ajaxcontrol toolkit in my application.
I have also implemented autosuggest list using classic XMLHTTP.
when I type search keyword in textbox it populates list , from list when I select record and hit enter key entire page is postback.

Please help me for same.

Hi Mukseshzala,

Based on your description, I think you should better use AutomComplelte control + WebService. Just like ths. You can get the whole source code from Ajax ControlToolkit Control.

Mukeshzala:

when I type search keyword in textbox it populates list , from list when I select record and hit enter key entire page is postback.

Please add this to your page , the onItemSelected function will be fired when click on the items.

<script type="text/javascript" language="javascript">
function pageLoad(){
$find("AutoCompleteEx").add_itemSelected(onItemSelected);
}
function onItemSelected(sender,eventArgs){
alert(sender.get_element().id);
}
</script>

I hope this help.

Best regards,

Jonathan

Pre-emptive Controls not working

I have installed Atlas the way the documentation says and am using VWD Express.
When I am in code mode, and type in <atlas: it does not pre-emp it and have the controls in the drop down. I'm not sure why? I finish manually entering it in, and receive no error. Not sure why this is doing it. Any ideas, or anyone had similar problems?

Mick

hello.

sometimes it takes a while to initialize the intellisense list here, but then it starts working without any problems.


yes, it does take awhile, today it is working perfectly!!
Thanks,
mick

Saturday, March 24, 2012

Problem Adding Declarative Script to a Content Page

Problem Adding Declarative Script to a Content Page - I get this error:

"Assertion failed: could not find HTML element with ID "Wait" for control type Sys.UI.Image"

I have the following:

<asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">

<atlas:ScriptManagerID="ScriptManager1"runat="server"EnablePartialRendering="True">

</atlas:ScriptManager>

<scripttype="text/xml-script">

<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">

<components>

<image id="Wait" visibilityMode="Collapse" />

</components>

</page>

</script>

<imgid=Waitrunat=serversrc="Images/spinner.gif"/>

Server controls do not always have the same client ID as the ID you specify - instead, they are given a unique ID based on what naming containers they live in. If you do a View Source on the client, you'll see this.

There are two ways to solve this:

1) Don't make the img a server control. This makes sense if you're not doing anything dynamic with the image on the client - there's no value in making it a server control.

2) If you do need to make the image a server control, you can obtain the ClientID property of the control and databind that into your script:

<image id="<%# Wait.ClientID %>" visibilityMode="Collapse" />

You'll need to call DataBind on the page (or on a container control that contains the script) to get this databinding to happen.

Thanks,



Thank you.

Side question: Does it matter 'where' on the page the xml script tags are located?

The reason I ask: In the examples they are usually located outside of the form tags - but since the content pages do not have form tags.

Thanks again for the quick response.