예제 #1
0
		public void InnerText2 () {
			HtmlButton c = new HtmlButton ();
			DesignerDataBoundLiteralControl x = new DesignerDataBoundLiteralControl ();
			x.Text = "FFF";
			c.Controls.Add (x);
			string s = c.InnerText;
		}
		public void Deny_Unrestricted ()
		{
			DesignerDataBoundLiteralControl ddblc = new DesignerDataBoundLiteralControl ();
			ddblc.Text = "mono";
			Assert.AreEqual ("mono", ddblc.Text, "Text");
		}
        private static void PersistDataBoundLiteralControl(TextWriter sw, DesignerDataBoundLiteralControl control) {
            Debug.Assert(((IDataBindingsAccessor)control).HasDataBindings == true);

            DataBindingCollection bindings = ((IDataBindingsAccessor)control).DataBindings;
            DataBinding textBinding = bindings["Text"];
            Debug.Assert(textBinding != null, "Did not get a Text databinding from DesignerDataBoundLiteralControl");
            
            if (textBinding != null) {
                sw.Write("<%# ");
                sw.Write(textBinding.Expression);
                sw.Write(" %>");
            }
        }