Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 12th, 2010, 02:04 PM
Authorized User
 
Join Date: Jul 2010
Posts: 81
Thanks: 10
Thanked 3 Times in 2 Posts
Default Starting to Get ASP.NET-Near End of Ch. 6

Well I finally got my website bdtcomp.com set-up and testing at

Note: I have removed the files from iis6 just go to www.bdtcomp.com 15 Aug. 2010

www.bdtcomp.com/iis6/ (with default.aspx as the home page). The pages load quickly. I like it. The CSS, Master Page, and even the BasePage is setup to force a Title on the web pages.

In fact I have found some small XHTML details that needed some tidying up. So I am hoping to do a makeover and I will forward my old pages to the new pages after testing is done.

Two problems working with web design in ASP.NET for me.

1. My forms aren't working. They work fine in HTML, as I tried them to make sure. I don't get a redirect page and I'm not getting the form sent to my email address. I'm I will be able to fix this.

2. When I was transferring my images to the image folder, I had to change the path slightly, by removing a forward slash. Not sure why that would be different. Then I haven't been able to figure out how to insert images in VWD directly, like you can in Dreamweaver and then give the images some padding. Another issue that probably has an easy solution. I did notice that you can use the image control, but I would like just a plain HTML type image with the <img> tag.

I am impressed with the power ASP.NET and the speed on my GoDaddy server hosting is very fast in rendering the pages. I am looking forward to putting in a calendar into my site, and possibly my bigger site too once I get more experience and education in ASP.NET.

Will finish up chapter 6 this week and continue on, but I'm glad I reviewed the material so far by starting to redo my website. ;-)
__________________
Bob
bdtcomp.com
http://lettersfromasoldier.com
Follow me on Twitter
“Success is not final, failure is not fatal: it is the courage to continue that counts.”~Winston Churchill

Last edited by btcomp; August 15th, 2010 at 10:36 PM.. Reason: I removed iis6 directory files
 
Old August 12th, 2010, 05:53 PM
Authorized User
 
Join Date: Aug 2010
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by btcomp View Post
Well I finally got my website bdtcomp.com set-up
Looks good. Hey yo, your not a yooper are ya?

Quote:
2. When I was transferring my images to the image folder, I had to change the path slightly, by removing a forward slash. Not sure why that would be different. Then I haven't been able to figure out how to insert images in VWD directly, like you can in Dreamweaver and then give the images some padding. Another issue that probably has an easy solution. I did notice that you can use the image control, but I would like just a plain HTML type image with the <img> tag.
Just got through reading about that, the / would be needed if you just put the images in the root folder. Since you created an Images folder you do not need this. (If I'm understanding this correctly.)

You could set the padding and <img> tag in the .css file couldn't you?
 
Old August 12th, 2010, 06:34 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
1. My forms aren't working. They work fine in HTML, as I tried them to make sure. I don't get a redirect page and I'm not getting the form sent to my email address. I'm I will be able to fix this.
If you need help on this you need to provide more information.

Quote:
2. When I was transferring my images to the image folder, I had to change the path slightly, by removing a forward slash.
It's probably because you run the site in the /IIS subfolder, Chapter 7, Navigation has lots of info on this.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old August 12th, 2010, 07:06 PM
Authorized User
 
Join Date: Jul 2010
Posts: 81
Thanks: 10
Thanked 3 Times in 2 Posts
Default

Quote:
Looks good. Hey yo, your not a yooper are ya?
No, live close to Canada, in the Lower Pennisula, thought I would like to live in the Upper Pennisula of Michigan, it's beautiful, with dozens of waterfalls, but stuck in the lower part.


Quote:
Just got through reading about that, the / would be needed if you just put the images in the root folder. Since you created an Images folder you do not need this. (If I'm understanding this correctly.)
Yep, I keep my images in images folder, though I think I'm going to subdivide this someday, with types of images, or whether they are images for buttons, or something else.

Quote:
You could set the padding and <img> tag in the .css file couldn't you?
I can, I just like the property panel in Dreamweaver. If you're familiar with Dreamweaver, you can see lots of similarities in the CSS edit properties window.
__________________
Bob
bdtcomp.com
http://lettersfromasoldier.com
Follow me on Twitter
“Success is not final, failure is not fatal: it is the courage to continue that counts.”~Winston Churchill
 
Old August 12th, 2010, 07:17 PM
Authorized User
 
Join Date: Jul 2010
Posts: 81
Thanks: 10
Thanked 3 Times in 2 Posts
Default

Quote:
If you need help on this you need to provide more information.
This is a really cool form I found a couple years ago, and used on a clients site. At the time they had a PHP code file that processed a form. Then I found this one which uses CSS. A shortened version is on my website. I will post the CSS code that I have for it, if there is interest. I have modified it quite a bit from when I studied it. But I will put the form code below, as you can run the form with or without the CSS, it still looks decent without it, just jazzier when you add the CSS.

Code:
<div id="signup">
    
    <form action="/gdform.asp" method="post"   name="contact_bdtcomp" id="contact_bdtcomp" onsubmit="return validate()">
      <input type="hidden" name="subject" value="Form Submission" />
      <input type="hidden" name="redirect" value="http:/www.bdtcomp.com/iis6/Thankyou.aspx" />
      <table>
        <tr>
          <td colspan="4" class="labelcell">If you would like more information or wish to contact me please fill out this form.</td>
        </tr>
        <tr>
          <td></td>
        </tr>
        <tr>
          <td colspan="4" class="labelcell">Please type in the following information:</td>
        </tr>
        <tr>
          <td colspan="2" class="labelcell" ><label for="name">Name</label></td>
          <td colspan="2" class="fieldcell"><input name="name" type="text"  id="name" tabindex="1" /></td>
        </tr>
        <tr>
          <td colspan="2" class="labelcell"><label for="email">Email Address</label></td>
          <td colspan="2" class="fieldcell"><input name= "email" type="text"  id="email" tabindex="8" /></td>
        </tr>
        <tr>
          <td colspan="2" class="labelcell"><label>
              <div align="left">Enter your comments or information request here.</div>
            </label></td>
          <td colspan="2" class="fieldcell"><div align="left">
              <textarea name="howfound" rows="5" id="howfound"></textarea>
          </div></td>
        </tr>
        <tr>
          <td colspan="4" class="labelcell"><input type="submit" name="Submit" value="Submit" tabindex="8" /></td>
        </tr>
      </table>
      <p>&nbsp;</p>
    </form>
    </div>
I hope I did this right.


The gdform.asp is the script I usually use because it's GoDaddy's they recommend. So you would have to change it.

Code:
It's probably because you run the site in the /IIS subfolder, Chapter 7, Navigation has lots of info on this.
Yeah, paths get me sometimes. I am going to put it in the root anyway. But will be glad to read chapter 7 then.;-)


Edit: I put the whole path in for the redirect to a Thankyou.aspx page so I could just force the page to work, but it didn't, but the same script worked fine in a .html page.
__________________
Bob
bdtcomp.com
http://lettersfromasoldier.com
Follow me on Twitter
“Success is not final, failure is not fatal: it is the courage to continue that counts.”~Winston Churchill

Last edited by btcomp; August 12th, 2010 at 07:20 PM..
 
Old August 12th, 2010, 08:18 PM
Authorized User
 
Join Date: Aug 2010
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by btcomp View Post
No, live close to Canada, in the Lower Pennisula, thought I would like to live in the Upper Pennisula of Michigan, it's beautiful, with dozens of waterfalls, but stuck in the lower part.
I've never been, sounds great though. I met a girl in Florida from the upper penninsula, and I use to see bumper stickers that said something like "Hey Yo to da Yoopers".


Quote:
Yep, I keep my images in images folder, though I think I'm going to subdivide this someday, with types of images, or whether they are images for buttons, or something else.


I can, I just like the property panel in Dreamweaver. If you're familiar with Dreamweaver, you can see lots of similarities in the CSS edit properties window.
I'm not familiar with much yet. Imar's book is the second book in my collection on web development. The first one was a basic HTML/CSS book to get me started. I enjoy using the forums along with his book to try and understand other people's problem. I hope it's not against etiquette to chime in on occasion.
 
Old August 12th, 2010, 08:37 PM
Authorized User
 
Join Date: Jul 2010
Posts: 81
Thanks: 10
Thanked 3 Times in 2 Posts
Default

Quote:
I'm not familiar with much yet. Imar's book is the second book in my collection on web development. The first one was a basic HTML/CSS book to get me started.
I read a bit on ASP.NET 2005 3 or 4 years ago, then didn't use it. Then two years ago, was hired to do some web design work, mostly template based but some from scratch. I am more a programmer I think, but I like both.

Quote:
I hope it's not against etiquette to chime in on occasion.
Not as far as I'm concerned. I'm liking the book and the form. Imar has been very helpful, and I want to get a review on his book out after I read a bit more. I am learning so much more than just ASP.NET.

I have been torn by the ones that keep saying go Open Source, but I think the info on here and the openess on much of what you can see just exploring websites makes it open. But as Imar has pointed out you can keep some of your source code hidden. That isn't necessarily a bad thing. It's good to share I believe, but then some hard earned sweat sometimes needs to be protected for a while. So I like a little bit of both.

BTW-I mentioned to Imar that I would post the CSS code to go along with the form. It's available at:http://www.bdtcomp.com/iis6/styles/registration.css

I may change it a bit, it presently is a blue color and I changed a clients to brown. So I will probably tweek the colors of my form. The other form I have on the Contact page doesn't use CSS code.
__________________
Bob
bdtcomp.com
http://lettersfromasoldier.com
Follow me on Twitter
“Success is not final, failure is not fatal: it is the courage to continue that counts.”~Winston Churchill
 
Old August 13th, 2010, 03:25 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Take a look at the final HTML of your form page in the browser. It contains a <form /> from the ASP.NET page and a nested <form /> from your contact form. Nesting forms is not allowed so when you submit the contact form you actually submit your outer form.

Try looking into Cross Page PostBacks. You can set the PostBack URL of a *server side* button to the URL of the page you want to submit to. All other controls in your server side form could be simple HTML controls to avoid having their names and IDs changed.

http://www.google.com/#hl=en&client=...+page+postback

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old August 13th, 2010, 06:18 AM
Registered User
 
Join Date: Apr 2010
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Smile Csharp

Hi Immar Do you have a book for learning cSharp or the only book you have is for asp.net????
Thanks
 
Old August 13th, 2010, 07:07 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Immar?? Who's that?

I don't have a separate C# book out; but the Beginning ASP.NET books have an introductory chapter on programming in C# and in VB.NET.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Before starting ASP.NET Freeshooter ASP.NET 3.5 Basics 5 February 15th, 2008 12:22 PM
Recordset Count starting from 1 till end nouky Classic ASP Databases 24 October 30th, 2006 06:22 PM
starting asp.net LAKESIDE XML 1 January 29th, 2006 11:34 PM
Starting from ASP.NET 1.1/2.0? kalunalan ASP.NET 1.0 and 1.1 Basics 20 February 23rd, 2005 05:10 AM
Starting ASP .NET web applications stripytiger General .NET 6 August 30th, 2004 01:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.