Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • jivan thapa 194 posts 681 karma points
    Mar 02, 2011 @ 14:24
    jivan thapa
    0

    Data lost, I am using user control data type.

    I create simple user control for example just to take input textbox, and created data type using umbraco usercontrol wrapper.  

    http://www.nibble.be/?p=24

      if (Page.IsPostBack)
                {
                                 if (TextBox1.Text.Length > 0)
                                  {
                                       umbracoValue = TextBox1.Text;
                                   }
                    else
                             {
                                    if (text.Length > 0)
                                             {
                                                      umbracoValue = "1234";
                               }                   
                    }


                    }      

    label1.text= umbracoValue;     


            public object value
            {
                get
                {
                    return umbracoValue;
                }

                set
                {
                    umbracoValue = value.ToString();
                }
            }

    Problem: using that data type i can create simple text input. when i press "save and publish" it works fine and i can get value next time.

    but when i create content and "Save", when i close the browser or open content next time value is empty or lost. i checked App-data/umbraco.config file its empty value.

    my questions is .

    when i use user control as datatype where umbraco save that value in database? and how to retrive that value from database? using c#.

     

    thanks in advance.

     

     

     

Please Sign in or register to post replies

Write your reply to:

Draft