using FastReport.Dialog;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FastReport.Web
{
public partial class WebReport : WebControl, INamingContainer
{
private void TextBoxChange(TextBoxControl tb, string data)
{
tb.Text = data;
tb.FilterData();
tb.OnTextChanged(null);
}
private string GetValHook()
{
return
"";
}
private string GetTextBoxHtml(TextBoxControl control)
{
string id = Prop.ControlID + control.Name;
if (control.Multiline)
{
return
GetValHook() +
string.Format("",
// class
"", //0
// style
GetTextBoxStyle(control), //1
// name
control.Name, //2
// value
control.Text, //3
// onclick
GetEvent("onchange", control, string.Format("$('#{0}').val()", id)), //4
//GetEvent("onchange", control, string.Format("document.getElementById('{0}').value", id)), //4
// title
id, //5
control.MaxLength,
control.Enabled ? "" : "disabled"
);
}
else
{
return string.Format("",
// class
"",
// style
GetTextBoxStyle(control),
// name
control.Name,
// value
control.Text,
// onclick
GetEvent("onchange", control, string.Format("document.getElementById('{0}').value", id)),
// title
id,
control.MaxLength,
control.Enabled ? "" : "disabled"
);
}
}
private string GetTextBoxStyle(TextBoxControl control)
{
return string.Format("{0}{1}", GetStandardStyle(control), GetControlAlign(control));
}
}
}