Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/04/2010, 17:31
Deyvi04
 
Fecha de Ingreso: agosto-2009
Mensajes: 142
Antigüedad: 14 años, 9 meses
Puntos: 2
Error con RenderControl() vb.net

Estoy intentando obtener el resultado de un div, al ejecutar el método, obtengo el siguiente error:
Cita:
Cannot get inner content of xPrintDiv because the contents are not literal.
E investigado para la solución del mismo y he ejecutado la siguiente instrucción:
Cita:
Dim SB As New StringBuilder
Dim Contenido As String, sw As New StringWriter(SB)
Dim w As New HtmlTextWriter(sw)

xPrintDiv.RenderControl(w)
Contenido = sw.GetStringBuilder().ToString
Pero me envia el siguiente error:
Cita:
Control 'ctl00_ContentPlaceHolder1_FormView1' of type 'FormView' must be placed inside a form tag with runat=server.
En este caso es del FormView1 pero en realidad es lo mismo con todos los controles, alguien me puede ayudar a solucionar este error.
Gracias.