Любые предложения по загрузке html-страницы, сохраненной в базе данных?
HTML:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>xxx</title>
</head>
<body>
<form id="Form1" runat="server" method="post">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
</form>
</body>
codebehind:
protected override void OnInit(EventArgs e)
{
this.IniciarFormulario();
using (ServicoECMClient proxy = new ServicoECMClient())
{
tipoDocumento = proxy.ObterTipoDocumento(int.Parse(tipoDocumentoID));
}
if (tipoDocumento == null)
{
throw new ApplicationException();
}
this.Page.Header.InnerHtml = tipoDocumento.estilo; //css
this.Page.Form.InnerHtml = tipoDocumento.form; // form
base.OnInit(e);
}
Я не могу получить значения формы.
Смотреть:
foreach (System.Web.UI.Control controle in this.Form1.Controls)
{
if (controle.GetType().Name == "HtmlInputText" || controle.GetType().Name == "HtmlInputSelect"
|| controle.GetType().Name == "HtmlInputRadio" || controle.GetType().Name == "HtmlInputTextCheckbox")
{
if (!string.IsNullOrEmpty(this.Request[controle.ClientID]))
{
documento_indice documentoIndice = new documento_indice();
documentoIndice.id_indice = int.Parse(controle.ClientID.Split('_')[1]);
documentoIndice.valor = this.Request[controle.ClientID];
documentoIndice.timestamp = DateTime.Now;
documentos_indices.Add(documentoIndice);
}
}
}
Элементы управления пусты. => это.Form1.Controls
Любое предложение?
Есть другой лучший способ сделать?
Спасибо.