![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#3
|
|||
|
|||
|
Cita:
Si ya hice un profile con el sql y no veo nada raro, salvo lo siguiente: al momento de seleccionar un proveedor con el dropdownlist se demora un poco desde que el cliente le envía la info(se demora como 8 segundos) porque de allí el servidor lo procesa rapido y devuelve el resultado (es decir la dirección y el telefono) si disculpa que no haya dado la información respectiva (ya decia yo que faltaba algo más ) aquí te la doy:- Utilizo el framework 2.0 - mi Ide es Visual Studio 2005 - Mi SO cliente es Windows XP Professional con SP2 - Mi SO servidor es Windows Server 2003 Standard Edition con SP1 - Utilizo el IIS - Microsoft SQL Server 2000 Enterprise - La cantidad de registro es muy poco por ahora (800) - Un sólo usuario conectado Aquí envío una parte del código también ChangeDlstShipper: es una función que sirve para obtener la dirección y telefono del shipper seleccionado Código:
Partial Class new_ship_inst_cs
Inherits System.Web.UI.Page
Implements System.Web.UI.ICallbackEventHandler
Private iObjParamCount As Integer
Private bSwValid As Boolean = False
Private _callbackArgument As String
Public Sub RaiseCallbackEvent(ByVal eventArgument As String) _
Implements System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent
Dim UOAdress, UOPhone As String
Dim stVal() As String
UOAdress = ""
UOPhone = ""
If dlstShipper.ID = Right(eventArgument, Len(eventArgument) - InStr(eventArgument, "ª")) Then
ChangeDlstShipper(Left(eventArgument, InStr(eventArgument, "ª") - 1), UOAdress, UOPhone)
_callbackArgument = txtShipAddress.ClientID & "º" & UOAdress & "ª" & txtShipperPhone.ClientID & "º" & UOPhone
ElseIf dlstConsignee.ID = Right(eventArgument, Len(eventArgument) - InStr(eventArgument, "ª")) Then
ChangeDlstShipper(Left(eventArgument, InStr(eventArgument, "ª") - 1), UOAdress, UOPhone)
_callbackArgument = txtConsAddress.ClientID & "º" & UOAdress & "ª" & txtConsPhone.ClientID & "º" & UOPhone
End If
stVal = Split(eventArgument, "ª")
If dlst_fact_ship_inst_cs.ID = stVal(1) Then
_callbackArgument = stVal(0)
End If
End Sub
Código:
Public Function GetCallbackResult() As String Implements _
System.Web.UI.ICallbackEventHandler.GetCallbackResult
Return _callbackArgument
End Function
m_addNewItem(<nombre_del_store_procedure>, <tipo_de_comando>, <lista_de_parametros_SP>, <numero_parametros>, <bit_indica_si_tiene_parametros_de_retorno>) "Alexim_SIConnectionString": es la cadena de coneccion Código:
Protected Sub ChangeDlstShipper(ByVal ItemUO As String, ByRef UOAdress As String, ByRef UOPhone As String)
Dim ObjStProc As New DataManaged("Alexim_SIConnectionString")
Dim stParams As String
Dim stResult As String
Try
stParams = "nvDom_prin_un_opª16ª200ª2¬" & _
"nvCod_pais_fono_tip_contacª16ª10ª2¬" & _
"nvCod_area_fono_tip_contactª16ª10ª2¬" & _
"nvFono_tip_contactª16ª15ª2¬" & _
"nvIdUOª16ª10ª1ª" & ItemUO 'CType(sender, DropDownList).SelectedValue
stResult = ObjStProc.m_addNewItem("up_GetPhoneAddressUO", 4, stParams, 5, 1)
UOAdress = Split(stResult, "¬")(0)
UOPhone = Split(stResult, "¬")(1) & Split(stResult, "¬")(2) & "-" & Split(stResult, "¬")(3) 'ObjParameter(2).Value.ToString & ObjParameter(3).Value.ToString & "-" & ObjParameter(4).Value.ToString
ObjStProc.Dispose(1)
Catch ex As Exception
Me.lbl_error.Text = "ha surgido el siguiente error: " & ex.Message
End Try
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Genera script para el callback de dlstShipper
Dim cm As ClientScriptManager = Page.ClientScript
Dim cbReference As String
cbReference = cm.GetCallbackEventReference(Me, "arg +'ª'+ valor", _
"ReceiveServerData", "") ' & "Objeto"
Dim callbackScript As String = ""
callbackScript &= "function CallServer(arg, valor)" & _
"{" & cbReference & "; }" ', Objeto
cm.RegisterClientScriptBlock(Me.GetType(), _
"CallServer", callbackScript, True)
dlstShipper.Attributes.Add("onchange", "CallServer(document.getElementById('" & dlstShipper.ClientID & "').value, '" & dlstShipper.ID & "');return false;")
dlstConsignee.Attributes.Add("onchange", "CallServer(document.getElementById('" & dlstConsignee.ClientID & "').value, '" & dlstConsignee.ID & "');return false;")
Dim csOtro As ClientScriptManager = Page.ClientScript
Dim cbOtro As String
cbOtro = csOtro.GetCallbackEventReference(Me, "arg +'ª'+ valor", _
"ReceiveServerDataOtro", "") ' & "Objeto"
Dim callbackScriptOtro As String = ""
callbackScriptOtro &= "function CallServerOtro(arg, valor)" & _
"{" & cbOtro & "; }" ', Objeto
csOtro.RegisterClientScriptBlock(Me.GetType(), _
"CallServerOtro", callbackScriptOtro, True)
dlst_fact_ship_inst_cs.Attributes.Add("onchange", "CallServerOtro(document.getElementById('" & dlst_fact_ship_inst_cs.ClientID & "').value, '" & dlst_fact_ship_inst_cs.ID & "');return false;")
End Sub
Gracias de antemano Saludos cordiales.
__________________
"La información tiene más valor cuando se comparte" Última edición por fer21unmsm fecha: 13-04-2007 a las 20:17:41. |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| página web | kapullok_2006 | Internet | 1 | 09-04-2007 22:57:42 |
| pie de página... | eli.vidal | Impresión | 4 | 08-11-2005 20:03:26 |
| Añadir el número de página al pie de página | Javi2 | Servers | 3 | 04-08-2005 18:15:36 |
| Pagina web | Rabata | Varios | 6 | 12-09-2004 15:22:30 |
| Pagina N de M | Franklim | Impresión | 0 | 14-04-2004 20:13:14 |
|