Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 28

Thread: Dynamic ASP.Net web controls

  1. #11
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Default

    Then again, if a control id cannot be found in the initialize stage, then an error does not necessarily have to occur, I guess. I have to retire from finding an explanation to the error that you got. If anything I am looking at the control tree, and the load view sate event (before the post back update) which I understand must have all the controls added in init that match the view sate that was save for the last processed page.

    This is what you lead me to. Are we coherent? I can't explain the error. My only thought is that you did not create the controls in init stage. I assumed that you did because you said that it worked for a while.

    I have spent many happy hours on this, how bout you?
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

  2. #12
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Default

    You fixed it. Great!

    Please explain
    furthur analysis led me to realise it was more a problem with my declaration and instanciation of the controls within the loop..
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

  3. #13
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Default

    Quest for anyone out there?

    If you have a dynamic control that is added in init, in a consistent way through post backs, is the view state saved automatically or manually? Is the viewstate loaded automatically? Does unsetting the ViewState property of the control change the afore mentioned answer.

    I will test this on a week end.
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

  4. #14
    Join Date
    Jul 2004
    Posts
    153
    Rep Power
    0

    Default part of solution....

    Quote Originally Posted by crosswire
    You fixed it. Great!

    Please explain
    My very first implementation worked without error because i didn't need to view state values...in fact i reset except the controls to my defaults except some labels...esentically it was in the page_onload()
    when i introduced additional controls like select/checkboxes boxes i move it to the page_initialize()...

    the other problem
    ok...what i did wrong:

    private function buildlayout()
    dim lbl as label
    dim btn as button
    din txt as texbox
    ...
    ...

    for dim i = 0 to whatever
    lbl = new label
    btn = new button
    txt = new texbox
    controls.add(lbl)
    ..
    ..
    next
    end function

    part of solution:

    private function buildlayout()

    for dim i = 0 to whatever
    dim lbl as new label
    dim btn as new button
    dim txt as new texbox
    controls.add(lbl)
    ..
    ..
    next

    end function

  5. #15
    Join Date
    Jul 2004
    Posts
    153
    Rep Power
    0

    Default

    hey crosswire...notice we're the only users hitting this thread..what?..isn't it interesting?....no one really uses asp.net?....no one uses dynamic stuff?... well i hope that someone read the article...i sent the link for...and the msdn stuff u posted..

  6. #16
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Default

    Well thank for sharing your problem, I learnt a lot.

    Yeah you article was good " http://aspnet.4guysfromrolla.com/articles/092904-1.aspx " Anyone interested should really read this

    ASP.Net is sweet, but I am not pulling anyone here into it because they are better off without
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

  7. #17
    Join Date
    Feb 2005
    Posts
    73
    Rep Power
    0

    Default

    I mostly haven't posted because I never really thought I could add much to the conversation. I think it is a great artical (the part I read). I am not really an asp.net user. That is to say I have dabbled in it for an hour to suit my purpose at the time. But I honestly don't even remember what I used it for. I have a feeling it was something to do with sending email.

    Obviously this artical was written to solve specific problems and therefor the following does not really pertain to it. However, what would help for people like me, if you would like show how usefull asp.net is, would be to make a fun gimmic page that shows off a lot of the features it has, or at least the feature you are interested in. Why I say this is, people like me are lazy. What I mean is there is so much to read that I only read what I need. The rest of the time I play World of Warcraft. If I don't think of doing something then obviously I am not going to try and find out how to do it. However, I do usually hit all the links posted here, just to see if anything catches my eye. So of course I have been to the Jamaican Game Developers site and so forth. But if I see a long, (even well writen), artical on something I may or may not use, chances are I will not read it. I am primarily a flash developer and I still just skim most of the flash articals I see. Mostly I look at the live examples, and if it interests me then I look to see what it is all about.

    Oh and asp.net is not the only way to make dynamic stuff. Most of my pages have controls changing, appearing and disappearing depending on what other controls are. And obviously Flash can be completely dynamic.

    Well there you are, I told you I didn't have anything of worth to add to the thread, but at least there are now three people in it.

  8. #18
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Default

    Oh and asp.net is not the only way to make dynamic stuff.
    True that!

    Speaking of just looking up stuff, I support that. I would use or create a centralized library of code examples for various tasks, like regular expression.
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

  9. #19
    Join Date
    Jul 2004
    Posts
    153
    Rep Power
    0

    Default

    i was refering to dynamic stuff using asp.net...yes..ofcourse other language constructs allows for this....php used with javascript is quite good at this...it can be viewed as much easier...at least to implement....

  10. #20
    Join Date
    Feb 2005
    Posts
    73
    Rep Power
    0

    Default

    Do you have any examples of asp.net sites that are dynamic. Better yet show off just how much you can do with ASP.net. I have only looked a tiny bit, but I have not seen anything of note.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •