Showing posts with label current. Show all posts
Showing posts with label current. Show all posts

Saturday, March 24, 2012

Ajax tags not registering

Hi

I want to convert my current site to an AJAX enabled site. I tried by adding a script manager control but this didn't work. I decided to start my site from scratch (it needed it anyway).

I believe that I have installed AJAX correctly. I have the AJAX Extensions, CTP, and Toolkit installed in the program Toolbox.

When I try to add the tags, <AJAX> or <ATLAS> Visual Web Developer doesn't like it. It forms a red line under it. Am I missing a step?

hello.

are you using master pages? if so, ?then there's a known issue with it and you should change the name of the prefix of the ajax controls to something different from asp in the web.config ?file.
Thanks, I am using master pages? Can you tell me what and where I change it?
don't worry, sorted it. asp to ajax. thanks again.

Wednesday, March 21, 2012

ajax stopping all events

Hi,

I'm trying to implement some ajaxfeatures in current asp application. (App has been converted to vs2005 recently).

I've already used ajax update panels with popupcontrolextenders and scriptmanager on one of the sites. But when Im trying to use similar pattern in another site

(update panel + gridview) everything stops working. By everything I mean that when I add scriptmanager control to the page, most events stop to fire at all. Only gridviews paging and sorting events work. Here some code:

<%@dotnet.itags.org. Page Language="c#" MasterPageFile="~/MasterPage.Master" Codebehind="PC_Scor_Search_Results.aspx.cs"
AutoEventWireup="True" Inherits="WBOnline.PC_Scor_Search_Results" %
<%@dotnet.itags.org. Register Assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="Microsoft.Web.UI" TagPrefix="ajaxExt" %>
<%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %> <asp:Content ID="content12" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"
<ajaxExt:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server">
</ajaxExt:ScriptManager>

<asp:ObjectDataSource ID="objComboWind" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetWBNamesWithIDEmpl" TypeName="WBOnline.BLL.Dictionaries_BLL"></asp:ObjectDataSource
<table border="0"> <tr>
<td style="height: 64px">
<table cellspacing="0" cellpadding="0" width="907">
<tr>
<td class="tableDanekomorka">
</td>
<td class="tableDanekomorka" colspan="2" rowspan="1">
</td>
</tr>
<tr>
<td class="tableDanekomorka" style="height: 19px">
<asp:Label ID="lblIloscWynikow" runat="server" CssClass="pole" Height="4px" Font-Size="XX-Small" Font-Names="Verdana">Ilo?? wyników na stronie</asp:Label><asp:DropDownList ID="ddlIloscWynikowNaStronie" runat="server" Width="80px" Font-Size="XX-Small" Font-Names="Verdana">
<asp:ListItem Value="20">20</asp:ListItem>
<asp:ListItem Value="50">50</asp:ListItem>
<asp:ListItem Value="100">100</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="btnOdswiez" runat="server" CssClass="przycisk" Font-Names="Verdana" Font-Size="XX-Small" OnClick="btnOdswiez_Click" Text="Od?wie?" />
<asp:Button ID="btExcel" runat="server" CssClass="przycisk" OnClick="btExcel_Click" Text="Eksport" Font-Names="Verdana" Font-Size="XX-Small" /></td>
<td class="tableDanekomorka" style="height: 19px">
<asp:Label ID="lblWindykator" runat="server" CssClass="pole" Height="4px" Font-Size="XX-Small" Font-Names="Verdana" Width="80px">Windykator:</asp:Label><asp:DropDownList ID="ddlWindykator" runat="server" Width="200px" Font-Size="XX-Small" Font-Names="Verdana" Enabled="False" DataSourceID="objComboWind" DataTextField="Nazwisko" DataValueField="IDPracownik">
</asp:DropDownList>
<asp:Button ID="btnPrzydzielWindykatora" runat="server" CssClass="przycisk" OnClick="btnPrzydzielWindykatora_Click" Text="Przydziel wszystkie" Font-Names="Verdana" Font-Size="XX-Small" /></td>
</tr>
</table
</td>
</tr>
<tr>
<td>
<div> <asp:GridView ID="gvSearchResults" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="objSearchResults" OnSelectedIndexChanged="gvSearchResults_SelectedIndexChanged" PageSize="20" Font-Size="Small">
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID">
<HeaderStyle CssClass="hiddencol" />
<ItemStyle CssClass="hiddencol" />
</asp:BoundField>
<asp:BoundField DataField="Regres" HeaderText="Regres" ReadOnly="True" SortExpression="Regres">
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="OrderNumber" HeaderText="Nr wew" ReadOnly="True" SortExpression="OrderNumber" />
<asp:BoundField DataField="Name" HeaderText="Windykowany" ReadOnly="True" SortExpression="Name">
<HeaderStyle Wrap="False" />
</asp:BoundField>
<asp:BoundField DataField="WindykatorID" HeaderText="WindykatorID" ReadOnly="True" SortExpression="WindykatorID">
<HeaderStyle CssClass="hiddencol" />
<ItemStyle CssClass="hiddencol" />
</asp:BoundField>
<asp:BoundField DataField="Windykator" HeaderText="Windykator" ReadOnly="True" SortExpression="Windykator">
<ItemStyle Wrap="False" />
</asp:BoundField>
<asp:BoundField DataField="DataPrzekazania" HtmlEncode="False" DataFormatString="{0:d}" HeaderText="Data przekazania" ReadOnly="True" SortExpression="DataPrzekazania">
<HeaderStyle Wrap="False" />
</asp:BoundField>
<asp:BoundField DataField="DataWizyty" HeaderText="Data wizyty" ReadOnly="True" SortExpression="DataWizyty">
<ItemStyle Wrap="False" />
<HeaderStyle Wrap="False" />
</asp:BoundField>
<asp:CheckBoxField DataField="Zamknieta" HeaderText="Zamkni?ta" SortExpression="Zamknieta" />
<asp:CommandField SelectText="Pobierz" ShowSelectButton="True" /
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="objSearchResults" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetScoringSearchResults" TypeName="WBOnline.BLL.PC_Scor_BLL" OnSelecting="objSearchResults_Selecting" EnableViewState="False">
<SelectParameters>
<asp:Parameter Name="idEmployee" Type="Int32" />
<asp:Parameter Name="orderBy" Type="String" />
<asp:Parameter Name="sortOrder" Type="String" />
</SelectParameters>
</asp:ObjectDataSource> </div>
</td>
</tr>
</table>
</asp:Content>



Solution: Install IE 7.0 (or some updates for IE6.0), install ajax rc december.

I don't see you using any UpdatePanel ... !?

WS


Damn, I posted wrong version. I did use updatepanel (it contains gridview with objectdatasource).

Problem with stopping all events disappeared, now I can't get rid of an 'sys is undefined' error.

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