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.40 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-09-04
[18:25]<afd>ah
[18:25]<rwyfcygs>I can never be bothered....
[18:26]<zyccus>AqD: where do you get it from though?
[18:26]<afd>rikkus: DC :D
[18:26]<afd>rikkus: there are ppl who share their entire hard disk
[18:26]<dyguw>Does anyone have a simple sample on how to properly split a webform into an aspx file and one aspx.cs file?
[18:27]<afd>minux: put all code to .cs and all html content to .aspx
[18:27]<zyccus>AqD: hmm, it's a bit too tall for my liking
[18:28]<afd>rikkus: yes it's huge
[18:28]<dyguw>Well, how? Since the .cs file contains a class which is inherited by the .aspx file. I don't understand the way of thinking.
[18:28]<afd>that's why i'm using consolas now
[18:28]<afd>minux: .aspx is compiled at runtime
[18:28]<afd>minux: to a .class file
[18:28]<afd>minux: so at runtime it becomes 2 classes
[18:29]<dyguw>I know, which fucks my mind. Remember I've been doing this in Perl for at least 5 years.
[18:29]<afd>minux: once a web app starts, there is nothing but hard code
[18:29]<afd>it's like jsp
[18:29]<dyguw>And in Perl it has nothing to do with classes, etc.
[18:30]<dyguw>AqD: Doesn't matter how much you'll explain. I need code to understand it.
[18:30]<afd>the compiler reads .aspx file and makes a big cs with "WriteLine..., WriteLine. ..."
[18:30]<afd>heh
[18:30]<afd>minux: you got reflector?
[18:30]<dyguw>How will reflector help me? I need to see a live sample with one .aspx and one .aspx.cs file
[18:30]<afd>you can go to c:\windows\microsoft.net\..... temporary asp.net files\
[18:30]<afd>there will be many DLLs
[18:30]<dyguw>That won't help me at all-.
[18:31]<afd>minux: what do you want to know??
[18:31]<dyguw>I want a real world sample of one .aspx file that works with another aspx.cs file
[18:31]<zyccus>fire up VS.NET and make an .aspx file :)
[18:31]<afd>ok
[18:31]<dyguw>rikkus: That will make the .cs file empy. Makes me understand nada.
[18:32]<dyguw>I don't know how to make them work together.
[18:32]<rwyfcygs>Drop a control, double click it, add event handler code?
[18:32]<dyguw>How do I then use the control in the aspx file?
[18:32]<rwyfcygs>Or does VS not use code behind by default?
[18:32]<zyccus>well, if you did what I suggested, you'd see
[18:32]<afd>minux: controls that have ID set is the public fields in .cs file
[18:32]<zyccus>awilkins: it does, yes
[18:33]<rwyfcygs>ASP WebMatrix did all-in-one
[18:33]<afd>minux: event handling
[18:33]<zyccus>minux: for a control called FooLabel, you get a protected Web.UI.Controls.Label FooLabel in your class
[18:34]<afd>rikkus: it works unless you are using 2005's new crap model..
[18:34]<zyccus>I heard stuff about that
[18:34]<zyccus>lots of people were waiting to be able to use the old model
[18:34]<dyguw>Okay, I've added a Foobar.aspx file with a .cs file as well. So, I drop a asp:Button in the design view of the aspx file.
[18:34]<afd>minux: are you going to write in that? or you just want to learn?
[18:34]<zyccus>is it really a problem?
[18:35]<afd>minux: and you can specify a method to call when the button is prressed and submitted
[18:35]<dyguw>So, now I got this <asp:Button ID="Button1" runat="server" Text="Button" /> in the aspx file, but nothing in the .cs file.
[18:36]<zyccus>so make a class
[18:36]<rwyfcygs>Plonk the page to design view
[18:36]<zyccus>inheriting System.Web.UI.Page
[18:36]<rwyfcygs>And double-click the button
[18:36]<zyccus>oh yes sorry, you're in VS.NET
[18:36]<afd>minux: you can add public Button Button1; by yourself
[18:36]<dyguw>AH!
[18:36]<dyguw>awilkins: Thanks.
[18:36]<rwyfcygs>Just like WinForms (ish)
[18:36]<dyguw>That put a Button1_Click method in the .cs file.
[18:36]<afd>minux: congrats
[18:37]<afd>minux: you just begin to understand how crap it is ;)
[18:37]<dyguw>I don't see why I should put the code in the .cs file though. Why not just put the code in the .aspx file directly?
[18:37]<zyccus>minux: to separate your web page and your web page's code
[18:37]<rwyfcygs>I have to say, I understood the old ASP much better, but I've never really played with the ASP.NET to any real extent.
[18:37]<afd>rikkus: yet it's not real MVC
[18:37]<zyccus>why use functions?
[18:37]<rwyfcygs>Like actually doing a real application in it.
[18:37]<dyguw>awilkins: I agree.
[18:37]<zyccus>AqD: it's not MVC in the slightest. It's a different model.
[18:38]<dyguw>awilkins: The old ASP way-of-thinking is more like the good ol perl way-of-thinking. :)
[18:38]<afd>minux: NO
[18:38]<rwyfcygs>minux: I don't see why you can't code ASP.NET in much the same style though, you just have to fit the code into the Page class model
[18:38]<dyguw>Which is what I am used to.
[18:38]<zyccus>minux: with the code and the page separate, you can edit the page while the app's running without requiring a recompile
[18:38]<afd>minux: have you tried monorails?
[18:39]<dyguw>Well, can't say I like ASP.NET that much to put any effort into learning it, why even bother looking at something like monorails then?
[18:39]<afd>minux: or you can see how things are done in my framework http://aqdweb.sourceforge.net/HomePage
[18:39]<dyguw>I'll just go back to Pelr.
[18:39]<dyguw>Perl*
[18:39]<afd>minux: because asp.net's page class sux :-/
[18:39]<zyccus>and you can send the pages off to the marketing company and wait for them to give you back a broken design which you re-make from scratch in a similar style to what they did
[18:39]<afd>minux: you have been sleeping for a decade?
[18:40]<dyguw>AqD: I've been using Linux only for a decade.
[18:40]<afd>minux: the new model is needed because it's clean and it reduces a lot of code
[18:40]<dyguw>I see.
[18:41]<afd>minux: not because it makes apps look good
[18:41]<afd>minux: you can try to read about java tapestry or RoR
[18:41]<rwyfcygs>Yeah, I'm familiar with ASP and can probably be more productive in it than ASP.NET right now, but it still sucks my ass gasses through a bong.
[18:41]<dyguw>No time for that, I'll just write the website the way I would in old ASP.
[18:42]<afd>minux: oh okay
[18:42]<afd>but
[18:42]<dyguw>Then I'll hunt for more jobs and get a decent server which I can run Linux with Perl on.
[18:42]<afd>my old asp way is quite like asp.net :D
[18:42]<afd>don't everyone build a framework before they begin writing web apps?
[18:43]<dyguw>Since this is my first Windows web-app ever, no.
[18:43]<afd>minux: if you do then asp.net does give you a better base to begin with
[18:43]<rwyfcygs>AqD: My finest old ASP page was just a page that ate the output from a VB6 DLL that spat generic grid XML.
[18:43]<afd>hmm
[18:43]<afd>all right, good night every1!
[18:43]<afd>bed time :)







