Search

You searched for the word(s): userid:155802

Matching Posts

  • Re: Overloaded Method problem

    Calling it the way metalasp.net worked so I went with that approach... Thanks everyone
    Posted to C# (Forum) by Rab815 on 5/29/2009
  • Re: Overloaded Method problem

    problem with that is that is an explicit call... the caller of the function doesn't necessarily know if it's a null int or a null string and it shouldn't need to know.
    Posted to C# (Forum) by Rab815 on 5/29/2009
  • Overloaded Method problem

    I have two methods... Method1(int one, int? two) Method1(int one, string two) So the methods are overloaded and the problem is when calling Method1( 9, null ) it doesn't know which method to enter because the second param cannot be identified as either string or int? so it always calls the first one it sees. Anyone shed any light on how to get around this? Thanks
    Posted to C# (Forum) by Rab815 on 5/29/2009
  • Re: CompositeControl properties not reflected in Property window

    Yeah I saw what it was doing and tried to mimic that exact functionality that way I wouldn't have to implment the postbackdata handler but it wouldn't work for me... I still couldn't get the value on postback until the second time it was posted... so I jsut tweaked the approach that you gave me. I still use the postback data handler event and set the Text property in that. although if I had my drouthers I would try to get it working without it.
    Posted to Custom Server Controls (Forum) by Rab815 on 8/27/2007
  • Re: CompositeControl properties not reflected in Property window

    Got it working it seems. Although with a slight tweak on what you had posted. I used this in the Postback data handler bool IPostBackDataHandler .LoadPostData( string postDataKey, System.Collections.Specialized. NameValueCollection postCollection) { Text = postCollection[emailTextBox.UniqueID]; return false ; } void IPostBackDataHandler .RaisePostDataChangedEvent() { } This is in Create Child controls. emailTextBox.Text = ( string .IsNullOrEmpty(Text)) ? emailTextBox.Text : Text; I no longer override
    Posted to Custom Server Controls (Forum) by Rab815 on 8/27/2007
  • Re: CompositeControl properties not reflected in Property window

    Got it working it seems. Although with a slight tweak on what you had posted. I used this in the Postback data handler bool IPostBackDataHandler .LoadPostData( string postDataKey, System.Collections.Specialized. NameValueCollection postCollection) { Text = postCollection[emailTextBox.UniqueID]; return false ; } void IPostBackDataHandler .RaisePostDataChangedEvent() { } This is in Create Child controls. emailTextBox.Text = ( string .IsNullOrEmpty(Text)) ? emailTextBox.Text : Text; I no longer override
    Posted to Custom Server Controls (Forum) by Rab815 on 8/27/2007
  • Re: CompositeControl properties not reflected in Property window

    Yup... when I set the value in design time it works perfect. However... try this... Don't set the Text property at design time, Leave it blank cause assume this is something someone would fill out on a form, place the phone number control on an aspx page along with a label and a button then in the button click event put in this: protected void Button1_Click(object sender, EventArgs e) { string ph = PhoneNumberTextCtrl1.Text; Label1.Text = ph; } Load the page and put in the number 123-123-1234
    Posted to Custom Server Controls (Forum) by Rab815 on 8/25/2007
  • Re: CompositeControl properties not reflected in Property window

    That didn't seem to work... matter of fact that actually reset the value to nothing on the front end. Before that it was being carried though in the viewstate I just couldn't access the method in the page load. Funny part is I read that I don't even need to override and use the render method because the controls know how to render themselves unless I want to give it special formatting. It actually still renders fine without the method... still doesn't work though. Something is screwy
    Posted to Custom Server Controls (Forum) by Rab815 on 8/25/2007
  • Re: CompositeControl properties not reflected in Property window

    Now I'm really confused... I put everything in ViewState as you stated and it works great in design time. I can set the required properties no problem.... however... I can't get the Text property at runtime. it comes back as blank on postback. ie... I put the control on a page, put in a phone number, then on postback the Text property is blank... I posted the whole control below. Everything else is working great... if I set the required field to true or the regex validator to true and give
    Posted to Custom Server Controls (Forum) by Rab815 on 8/24/2007
  • Re: CompositeControl properties not reflected in Property window

    Ahhh, I keep forgetting about those newer nullable types for value types . I did discover through trial and error that any property having a defined defaultvalueattribute would not be serialized to the asp.net code in design time if it was set to that default value. Would you recommend any good books on server/composite control development. I'd like to learn more about this stuff. Things like this PropertyDescriptor.ShouldSerializeValue attribute is news to me. I'm sure there are many of
    Posted to Custom Server Controls (Forum) by Rab815 on 8/24/2007
Page 1 of 5 (41 items) 1 2 3 4 5 Next >