PDA

View Full Version : New to ASP.NET: Few questions


BarrMan
09-28-2007, 12:48 AM
Hi.
I'm new to ASP.NET and I've just bought a book.
I'm an old ASP user and I have a few questions about this new language.

I know the advantages of the language over ASP but I know it's coded very differently from it too. The reason I'm scared of learning ASP.NET is because I'm afraid that I'll lose the knowledge of my CSS coding and web styling since I've seen that ASP.NET styling is much more different than the regular web styling.

I also know that the database drawing information is much more different too and is used from a template table with an arranged footer and header.

I know all of these because I've tried learning ASP.NET alone over the internet. But maybe there's a way to make ASP.NET coding more familiar to what I know (The ASP environment).

If my thoughts or worries are wrong, I'd appreciate if you told me how I would even enjoy learning this new language.

Thanks in advance.

Imri.

Also, what program should I use that is free and good?

Freon22
09-28-2007, 06:03 AM
Am an old vbscript coder also, so I know where you are coming from. Few thing to keep in mind. CSS work the same you will not lose them. You can add to your styling with MasterPages if you want. You can add to your styling with Theme. There is a lot more open to you with dot.net.

As far as database work, you also have tons of options opened to you. That was the biggy to me. When you are uses to RecordSets then bam you don't really use those anymore. lol But if you reseach DataReader you can run your select statements and read your data into your variables almost like the old recordset. The differents is the datareader only run one way. Now all your update, delete, insert you can do with T-SQL statements.

You have a long road ahead of you to change your mind set of how you do thing with vbscript. But once you get into vb.net 2005 and after you have pulled out some hair lol you will end up liking it. But alway try to keep in mind that you are moving into OOP programming. Take it one step at a time and you will be fine.

Edit: just seen your last question.
Visual Web Developer = Free
http://msdn2.microsoft.com/en-us/express/aa700797.aspx

SQL Server Express = Free
http://msdn2.microsoft.com/en-us/express/aa718378.aspx

BarrMan
09-28-2007, 11:32 AM
Thanks. I appreciate your time.
I would like some more comments before I start learning.

Thanks again.

BarrMan
09-28-2007, 01:23 PM
Ok. I've started learning ASP.NET and I already downloaded Visual Studio 2005.
Now my problem is that it executes the code in Internet Explorer and I'd like it to execute the code in Firefox. Is it possible?

One more problem that I forgot to mention in the first post is that the compiled code (the one you see when you click on view source) is very messed up and you can't debug your code through it.
So my question is: Is there a way to force ASP.NET to execute a cleaner code (Arranged tags code)?

Also, I feel like ASP.NET pages are taking longer to response rather than using a simple JavaScript application. It reminds me AJAX very much because it uses JavaScript but waits for the server to response too. Not that I think that this method is useless or helpful since I like AJAX very much. However, I think that AJAX is better because it just updates a small part of the page instead of refreshing it and passing new values using a form. What I don't really know is why the values can't be passed using the querystring because It's not really convenient to having your browser ask you if I want to proceed to the requested page every time I refresh it due to the form submission.

Thanks again for the help.

Freon22
09-28-2007, 02:33 PM
Hi Barrman,

Here is a link to MS How Do I videos. The list starts off with Ajax and if you scroll down you will see videos on SQL Express and then videos on VWD. I think these will answer just about all your questions.

On the IE / Firefox question, I have never wanted to change the default from IE to Firefox. But I believe you can I will look and see if you can. What I do is if I want to see how it will look in Firefox, Netscape or anyother browser. I just copy the url and paste in the other browsers.

http://msdn2.microsoft.com/en-us/asp.net/bb498194.aspx

PS: I have seen your name before, maybe on another forum. Anyway take care and have fun :)

Freon22
Tim

BarrMan
09-28-2007, 05:36 PM
Thanks alot again Freon! You're helping me very much.
I'll take a look at your link a bit later and give a feedback on it.

fireblade
09-28-2007, 06:20 PM
hi Barmann

I think if you want to run your test on Mozilla firefox, only the setting you have to do is, setting the firefox as the default browser. it wiLL work fine.
And another thing, you would better test the page in IE first. because aspx pages are mostly compatible with IE. some time i too find browser incompatibility.

BarrMan
09-28-2007, 06:37 PM
First. My Firefox is my default browser.
Second, how can I handle just imcompatibility of the language to browsers? Will microsoft update the language? (I'm not sure if Microsoft will because I've looked at their website and the design didn't support firefox too much.).

Thanks.

BarrMan
09-29-2007, 01:33 PM
I'm now confused a bit.
I've started programming ASP.NET with C# and I've seen everything it can do so it's pretty similar to JavaScripts actions + the Server-Side actions.
My question is: What is better to use? JavaScript or C# for small changes within the page?
I think the answer is that C# is more secure and JavaScipt is faster thus it's better to use JavaScript for actions that don't need to be protected + C# code is not revieled by the client which makes your code hidden.
Am I right?

SouthwaterDave
09-29-2007, 05:01 PM
Your understanding of client-side JavaScript v. server-side C# is correct.

Also, AJAX offers a half-way house solution. It uses client-side JavaScript to send a request and accept a response from the server so it can update the page without having to replace it with a new page.

BarrMan
09-29-2007, 05:08 PM
I see.
so if I use AJAX to call an ASP.NET page will it be also faster than loading the whole page again and more secure than using JavaScript?
Well.. It was a retoric question but if it's true then I don't know the purpose of ASP.NET. It can do so much but if the information is all passed by forms, then when you have bigger applications it's gonna be very slow. So the only reason to achieve such thing is to call ASPX applications using AJAX.

Am I right? Or is there something I'm missing?

SouthwaterDave
09-30-2007, 07:18 PM
AJAX enables requests to be sent to a server without updating the whole page. It is most useful when making partial updates to a page rather than providing a whole new page. A request still has to be processed by ASP.NET on the server.

What it usually boils down to is that JavaScript enhances the user experience and ASP.NET updates the database on the server.

BarrMan
10-01-2007, 03:38 PM
Hi.
Ok I got the answer for it now.
It was simple because it's very similar to ASP.
The answer is that Javascript is much faster but insecure and ASP.NET is slower and very secured so if you don't mind the information to be shown by anyone then you use JavaScript.

Thanks for the help guys!

I got one last question:
I've seen many ways of retreiving information from a database but I don't know what I should use.
What is the most similar way to ASP database retreiving and what is the best way (Secured and correct) to retreive the information?

Thanks again!