IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1822.25 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-06-28
[15:17]<zgzzcygnv>* Added *!*n=damieng@212.30.26.2 to ignore list
[15:17]<zgzzcygnv>your ip is hanging out
[15:18]<dzdyzzz-wjzc>fine by me
[15:18]<y-gz>anyone know how to disable opera 9 tray icon ?
[15:19]<dzdyzzz-wjzc>Seems to be a pretty normal AnarkiNet reaction. Make uninformed statement, send abuse to people with differing opinion, add to ignore list.
[15:22]<zgzzcygnv>yeah
[15:22]<zgzzcygnv>use firefox
[15:22]<zgzzcygnv>and uninstall opera
[15:22]<dzdyzzz-wjzc>more useful pearls of wisdom.
[15:23]<sdnffdxdlld>lol
[15:23]<y-gz>yes and add 2000 extensions to get the functionallity i want
[15:24]<dzdyzzz-wjzc>what do you mean my firefox only has... um, 12 extensions loaded ;-)
[15:24]<y-gz>well firefox i don't like very much
[15:25]<y-gz>opera is the only closed source software i use
[15:25]<sdnffdxdlld>I feel like the right fan boy using IE7 :P
[15:25]<y-gz>but that's because I am used to it since yeras
[15:25]<y-gz>*eyars
[15:25]<y-gz>lol
[15:25]<y-gz>*years
[15:41]<y-gz>Does someone know what is the relation of DesignerTransaction to undo/redo ?
[15:41]<y-gz>at design time that is
[16:30]<dzmzaivnz>Hmm. It doesn't look like anyone else knows how to make ViewState.Clear() work either.
[16:30]<dzmzaivnz>google throws out an awful lot of posts of people saying "I tried Viewstate.Clear() and it didn't work."
[16:33]<dzmzaivnz>Also setting Page.EnableViewState = false; doesn't work.
[16:34]<dzmzaivnz>Nor does doing so on each control on the page. Le sigh. <Insert derogatory remarks about microsoft here>
[16:38]<dzdyzzz-wjzc>well one option would be to re-execute whatever code you have to set the page controls values back
[16:39]<-- sgvgzs xzs fuyv (>/dev/brain")
[16:41]<dzmzaivnz>Yes. Another option would be to behead whatever idiot came up with having this ridiculous default behaviour being almost impossible to disable.
[16:42]<dzmzaivnz>This option is increasingly finding favour with me.
[16:42]<dzdyzzz-wjzc>i stopped using webforms ages ago.
[16:42]<dzdyzzz-wjzc>HtmlControls all the way :)
[16:45]<dzmzaivnz>Hmm. I thought these were HtmlControls.
[16:46]<dzmzaivnz>They're <asp:Textbox>s
[16:48]<dzdyzzz-wjzc>right so thats System.Web.UI.TextBox
[16:49]<rjjgwq>Is anyone in this channel using monodevelop ?
[16:49]<dzdyzzz-wjzc>sorry System.Web.UI.WebControls.TextBox
[16:49]<dzmzaivnz>Oh, I see. It's a WebControl rather than an HtmlControl. Oops.
[16:50]<dzdyzzz-wjzc>There are a lot of simpler classes in System.Web.UI.HtmlControls
[16:50]<awjzdd>sup guys
[16:50]<dzdyzzz-wjzc>they don't support viewstate etc
[16:50]<awjzdd>Liquid-Work: hows it goin for you?
[16:50]<dzmzaivnz>Sigh. Oh well. I'll bear that in mind for future projects with ASP.NET
[16:50]<dzmzaivnz>But for now I'm stuck with web controls.
[16:50]<dzdyzzz-wjzc>but they still support databinding etc.
[16:50]<dzmzaivnz>(I'll also bear in mind cyanide for future projects with ASP.NET)
[16:50]<dzdyzzz-wjzc>Hmm. actually they do seem to still support viewstate... ok...
[16:51]<awjzdd>damieng-work: oi!
[16:51]<dzdyzzz-wjzc>what exactly is the problem DreamweaverN
[16:51]<dzdyzzz-wjzc>hey jwormy
[16:51]<awjzdd>damieng-work: hows your world oging todaY?
[16:52]<dzdyzzz-wjzc>jwormy so-so. looks like the house i was going to buy is falling through :( But got the project I'm working on back and operational after a long period of being broken through some signifcant restructuring/design changes.
[16:52]<dzmzaivnz>When you submit the form it refreshes the page. This is intentional. I want it to do so with the form elements all blank and ready to have an entirely new entry put in place, but it is insisting on creating the form elements with their old value.
[16:52]<dzmzaivnz>Despite everything I have tried to prevent it from doing so.
[16:53]<dzdyzzz-wjzc>okay, so one option is to create a function that sets the .value of all your controls back to their default
[16:53]<zyccus>DRMacIver: I think you should just turn viewstate off... it'll make life much easier
[16:54]<zyccus>DRMacIver: as for your worry about it making the code more complex... use a method, or do it in the VS.NET designer so you don't even have to see the code
[16:55]<dzmzaivnz>rikkus: I'm trying to!
[16:56]<dzmzaivnz>Anyway, I've got a solution.
[16:56]<dzmzaivnz>It's a dirty hack, but it works.
[16:56]<dzmzaivnz>Response.Redirect("ThisPage.aspx")
[16:56]<zyccus>why use a dirty hack when you can use the simple solution? What do you mean by 'trying to'?
[16:58]<dzmzaivnz>rikkus: control.EnableViewState = false; does not appear to have any discernible effect upon whether this actually persists the value.
[16:58]<dzmzaivnz>Nor does anything else I've tried to turn the view state off.
[16:59]<dzmzaivnz>It's possible of course that this is actually the result of some dumbass IE client side effect. I don't know. But the fact of the matter is that everything I have attempted to do with fiddling with viewstate makes no difference.
[16:59]<drdyrrr9>right
[16:59]<drdyrrr9>what you're experiencing is NOT viewstate
[16:59]<dzmzaivnz>Sigh
[17:00]<dzmzaivnz>It sure looked like it at the time. Oh well. :)
[17:00]<drdyrrr9>but i agree, yes it is a pain.
[17:01]<drdyrrr9>viewstate handles everything you did to the controls server-side post designer code
[17:01]<lyfuym-wjzc>DRMacIver wahts up?
[17:01]<dzmzaivnz>I guess the moral of the story is "If it looks like a duck and quacks like a duck it's probably some idiot microsoft employee with a hunting lure and a silly costume."
[17:01]<drdyrrr9>what you're experiencing is .net reading the contents of the postback and populating the controls
[17:01]<drdyrrr9>LOL
[17:01]<lyfuym-wjzc>can you just hook on pageload
[17:01]<lyfuym-wjzc>if(!this.postback) { }
[17:01]<zyccus>hmm
[17:02]<lyfuym-wjzc>or is it this.ispostback
[17:02]<lyfuym-wjzc>dunno have not done web in a while
[17:02]<dzmzaivnz>Liquid-Work: The problem is that form fields were getting persisted when I wanted them to clear on reload.
[17:02]<zyccus>DRMacIver: sorry, then, looks like I completely misunderstood what was happening there
[17:02]<zyccus>Liquid-Work: IsPostBack
[17:02]<lyfuym-wjzc>rikkus might that not work?
[17:02]<dzmzaivnz>I've solved the problem with a redirect, but it's not really ideal.
[17:03]<dzmzaivnz>Liquid-Work: The problem is that there's no explicit part of the code in which this is happening.
[17:03]<dzmzaivnz>It's something ASP.NET is doing automatically.
[17:03]<lyfuym-wjzc>yes
[17:03]<lyfuym-wjzc>postback
[17:03]<lyfuym-wjzc>:)
[17:03]<dzmzaivnz>And as such really really hard to track down and bludgeon to death with a hammer.
[17:03]<zyccus>I'm guessing it fills in the values before Page_Load runs...
[17:03]<dzmzaivnz>rikkus: Tried doing it at pre_init as well
[17:04]<dzmzaivnz>No difference
[17:04]<dzmzaivnz>And several other stages in addition.
[17:04]<lyfuym-wjzc>DRMacIver check the msdn reference for IsPostBack
[17:04]<awjzdd>damieng-work: my current project is really rockin' well for me, really happy with it, as i'm trying to get two weeks worth of work done so i can take next week off to do some volunteer work
[17:04]<dzmzaivnz>Liquid-Work: Yes, but I don't see what you're suggesting I do with IsPostBack
[17:05]<zyccus>DRMacIver: there must be some method you can override...
[17:05]<dzmzaivnz>The problem isn't that I don't know how to check if it's a post back. It's that I don't know how, having done so, to tell it to go sit in the corner and leave my damn controls alone.
[17:05]<dzmzaivnz>rikkus: I'm sure there is. But this works, isn't too complicated, and has no undesirable side effects so I'm going to stick with it. :)







