Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Monday, March 26, 2012

Oh boy... where to start?

To make the post short and simple I will get straight to thepoint. I am new to ASP.net and want to start using 2.0 with the Visual BASIClanguage. I have never coded VB or ASP before and am wondering where to start.

I have designed forms and done very basic code, actually…but only stuff as simple as displaying text from one control into another.

I have watched the videos from learnvisualstudio.net whichgot me interested. I am mostly looking for online tutorials and ebooks, butvideos will do fine too.

My recommendation is that you first come up with an idea for a website. It can be anything at all, such as a fan site for your favourite movie or movie start, or a pretend online shop, or a list of your favourite jokes, or anything else. Sketch out on paper how you see each page looking and how each page would work (e.g., can visitors sign a guestbook?).
Then, start putting your website together, one page at a time.
This will guide your learning. There is so much to learn that it would be easy to become lost (which of the dozens of tutorials should you read?). This way, you can type into Google "ASP.NET guestbook" or "Save to Access database". Better yet, learning one thing will naturally lead to another (first, get the data from the visitor; second, save the data from the visitor; third, display all data from all visitors). This is much better than disconnected tutorials.
Also, it is more fun and more fulfilling to see your own website evolving than to create a bunch of little useless "tutorial" pages that you'll never look at again.
I hope this helps. And good luck with ASP.NET!

Hi Jaquio9131,
Welcome to the Asp.net forums. As SomeNewKid has suggested come up withan idea and implement it. You will notice that while implementing yourapplication you will come up with tons of new questions and learn muchmuch more.


Well I found a lot of ASP.net 1.1 tutorials. Is the only differencebetween 2.0 and 1.1 the changes/extra to the controls and some coolfunction added to the language? What I am asking is, did the VB-ASP.netlanguage change so much you would want to read tutorials aimed towardsASP 2.0?
Also, I have used the "absolute positioning" layout method but do you think its a good idea to use it or not?

jaquio9131 wrote:

Well I found a lot of ASP.net 1.1 tutorials. Is the only difference between 2.0 and 1.1 the changes/extra to the controls and some cool function added to the language? What I am asking is, did the VB-ASP.net language change so much you would want to read tutorials aimed towards ASP 2.0?

ASP.NET 2.0 is largely compatible with ASP.NET 1.1. That is, if you read an article on ASP.NET 1.1, there is a very high chance that the code will work in ASP.NET 2.0.
VB.NET (and C# for that matter) has a few new features. However, the new features will not invalidate what you might read in older articles about ASP.NET 1.1.
So I would recommend starting with ASP.NET 2.0, and that you should feel comfortable reading "older" articles concerning ASP.NET 1.1 as well as newer articles concerning ASP.NET 2.0.

jaquio9131 wrote:

Also, I have used the "absolute positioning" layout method but do you think its a good idea to use it or not?

If you are new to web design, I would not recommend that you use absolute positioning. You'll end up with controls overlapping and bumping and generally misbehaving. Very few websites use absolute positioning, and for good reason.

Ok thanks for helping guys. 1 last question though...
What is a good free host for ASP 2.0? I only saw 1 in the featuredhosting list on this site and its in a different language so I cantread the TOS >_>

jaquio9131 wrote:

What is a good free host for ASP 2.0?

I don't know about the good part, butAspSpider.NET provides free hosting for ASP.NET 2.0. I don't know anything about this host, and I do not vouch for it. But it may be all you need to get going with ASP.NET 2.0.

OK, What am I missing?@!?

I'm playing with Visual Web Developer 2005 Express Edition, coming from VisualStudio 2003.net.
I have a user control in the [application root]/util/controls directory. I have another control in that directory that needs to use the first control. I have in the ascx file of the second control the following line:

<%@dotnet.itags.org. Register TagPrefix="uc2" TagName="BannerTop" src="http://pics.10026.com/?src=/Util/Controls/BannerTop.ascx" %>
When I try to use the control (<uc2:BannerTopID="BannerTop1"runat="server"/>)I get an error saying that the file located at ~Util/Controls/Util/Controls/BannerTop.ascx could not be found (NOTE the duplicated path and the ~, I think indicating that it's trying to do a relative path).
WHY? Who the heck told it to use a relative path (NOTE the "/" at the beginning of the SRC line!)
Even when I delete the embedded control and then drag it in using the Visual Web Developer 2005 express edition, it does the same thing! Very frustrating
Am I missing something?
TIA,

When you say:

When I try to use the control (<uc2:BannerTopID="BannerTop1"runat="server"/>)



What exactly do you mean by this? Are you trying to reference this control in code?

I'm trying to put the control on the web page in the aspx file.
Confused [*-)] Did this syntax radically change with 2.0?
Pretty standard syntax in 1.1 to put a user control on a web page (See page 63 of the Microsoft Press book "Developing Microsoft ASP.Net Server Controls and Components" by Kothari and Datye)... I use it all over my 1.1 site....


For example:

<%@.PageLanguage="vb"AutoEventWireup="false"Inherits="cwsBackOffice.index"CodeFile="index.aspx.vb" %>
<%@.RegisterSrc="/Util/Controls/cwsbackofficecontainer.ascx"TagName="cwsbackofficecontainer"TagPrefix="uc1" %>
<!DOCTYPEHTMLPUBLIC"-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>
index
</title>
<body>
<formid="Form1"method="post"runat="server">
<uc1:cwsbackofficecontainerid="Cwsbackofficecontainer1"runat="server">
</uc1:cwsbackofficecontainer>
</form>
</body>

One thing I notice is that when dragging a UC into a Web Form (Html View or Design View doesn't matter in VS 2005), the Tilde (~) is inserted by default. This makes sense as Physical Path detection with the advent of Master Pages and storing systems for UCs etc should not be a concern of the developer. Example below showing how the .ascx file is referenced in VS2005 (drag'n drop):

<%@.RegisterSrc="~/UserControls/UC_Newsmodule.ascx"TagName="newsmodule"TagPrefix="uc2"%>


Doesn't work for me, though (with a VS2003 converted project anyway). I drag it in, I get the "~/UserControls/whatever.ascx" line, but then the compiler complains that "/UserControls/UserControls/whatever.ascx" cannot be found... I went in and hand edited the line, removing the tilde, and that part worked.

Except now it still insists that it doesn't know what the TagName objectis.
I think the problem lies in that the new Visual Web Developer doesn't know which parts of the project are code-library-type-things and which are web pages, etc. The project this was converted from used several code-library objects (written by us, compiled as part of the project) that seem to have been just copied to the new web project with no information provided to the web project as to how to use them (as objects!).
For instance, we have an in-house membership object called Membership.member. In the VS2003 source project, it is identified as a separate VB project (code-library) that is then referenced in the web project. How do I do this in the new Visual Web Developer 2005? I can't seem to add a code-library object to the project.
cheers,