Retroceder   Foros del Web > Programación para sitios web > .NET

Respuesta
 
Herramientas Desplegado
Antiguo 14-oct-2007, 23:10   #1 (permalink)
programadorvip ha deshabilitado el karma
 
Avatar de programadorvip
 
Fecha de Ingreso: agosto-2006
Ubicación: en lima peru
Mensajes: 172
Ejemplo de paginacion y ordenacion con ajaxpro, aqui parte 1

hola aqui les dejo un ejemplo de como paginar y ordenar sin el gridview y usando ajax + html. saludos
Código PHP:
create   PROCEDURE  [dbo].[Paginar]
@
PageSize int
@
PageNumber int 
AS 
set @PageNumber = @PageNumber 1
SELECT orderid
,productid,unitprice,quantity
FROM 

SELECT 
orderid
,productid,unitprice,quantity
ROW_NUMBER() OVER (ORDER BY orderid desc) AS RowNumber 
FROM 
[order details]
) AS [
order details]
WHERE RowNumber BETWEEN @PageSize * @PageNumber 
AND @PageSize * (@PageNumber 1
Código PHP:
<?xml version="1.0"?>
<configuration>
    <configSections>
        <sectionGroup name="ajaxNet">
            <section name="ajaxSettings" type="AjaxPro.AjaxSettingsSectionHandler,AjaxPro.2" requirePermission="false" restartOnExternalChanges="true"/>
        </sectionGroup>
    </configSections>
    <ajaxNet>
        <ajaxSettings>
            <urlNamespaceMappings useAssemblyQualifiedName="false">
                <add type="MyAjaxMethods,App_Code" path="_a"/>
            </urlNamespaceMappings>
            <jsonConverters>
                <add type="AjaxPro.BitmapConverter,AjaxPro.2"/>
            </jsonConverters>
            <oldStyle>
                <includeMsPrototype/>
            </oldStyle>
        </ajaxSettings>
    </ajaxNet>
    <connectionStrings>
        <add name="SQL_CN" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=northwind;Integrated Security=True" providerName="System.Data.SqlClient"/>
    </connectionStrings>
    <location path="Publica">
        <system.web>
            <authorization>
                <allow users="?"/>
            </authorization>
        </system.web>
    </location>
    <system.web>
        <authentication mode="Forms">
            <forms loginUrl="Default.aspx" defaultUrl="Default.aspx">
            </forms>
        </authentication>
        <customErrors mode="Off"/>
        <sessionState stateNetworkTimeout="20" sqlConnectionString="Data Source=.\SQLEXPRESS;Integrated Security=True" timeout="60"/>
        <pages maintainScrollPositionOnPostBack="true" validateRequest="false" enableEventValidation="false" viewStateEncryptionMode="Never" enableViewStateMac="false">
            <controls>
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            </controls>
        </pages>
        <!--<authentication mode="Forms">
            <forms loginUrl="Default.aspx" protection="All">
            </forms>
        </authentication>
        <authorization>
            <deny users="?"/>
        </authorization>-->
        <compilation debug="true">
            <assemblies>
                <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </assemblies>
        </compilation>
        <httpRuntime executionTimeout="110" maxRequestLength="60264" requestLengthDiskThreshold="80" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="5000" enableKernelOutputCache="true" enableVersionHeader="true" requireRootedSaveAsPath="true" enable="true" shutdownTimeout="90" delayNotificationTimeout="5" waitChangeNotification="0" maxWaitChangeNotification="0" enableHeaderChecking="true" sendCacheControlHeader="true" apartmentThreading="false"/>
        <httpHandlers>
            <remove verb="*" path="*.asmx"/>
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
        </httpHandlers>
        <httpModules>
            <add name="Session" type="System.Web.SessionState.SessionStateModule"/>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        </httpModules>
    </system.web>
    <location path="ajaxpro">
        <system.web>
            <httpHandlers>
                <add verb="*" path="*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2"/>
            </httpHandlers>
        </system.web>
    </location>
</configuration>
te bajas la libreria ajaxpro2 de mcihael. o sino entra a esta web
http://es.geocities.com/romanticoperu2002/paginacioneficiente.zip
programadorvip está desconectado   Responder Citando
Respuesta

No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Activado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 08:32.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93