Showing posts with label coding. Show all posts
Showing posts with label coding. Show all posts

Thursday, March 29, 2012

newbie - need early guidance

HI all

I am very new to coding and although I know how things work and what you can do with code and visual design I don't really have experience!

I would like some very basic advise on what coding front end to look into i.e. c++, VB, Web etc.

I am interested in learning to develop a basic system for my cafe that would enable a customer to go through a graphical experience in building their coffee order. I would ideally like to create something that would work well IN the cafe via a touchscreen or on the Internet from their desktop.

Now this is only basic stuff I'm not looking to build a go to market system but just something that applies to my daily life while giving me something new and challenging to look into.

Any guidance would be much appreciated!

Alfo,

I'm glad to hear that you would like to educate yourself in designing / programming / implementing a website.
In my opinion it is this very early stage that is the most important.
It is in this stage that you decide exactly what it is that your site will do and how it will do it.

My advice is to sit down with a pencil and paper and decide on some of the following options:
Will users be required to:
1) Login / Register - if yes
a) before they begin the process of placing an order
b) if they try to place an order
2) How will you accept payment? Cash, credit cards, e-checks, paypal...
3) What are all of the other high level functionalities that you'd like your site to offer?

Regarding what language to use, I much prefer C# (no particular reason, VB.Net is also a great and simple language to use).
It will have no impact on how your site looks to your customers. This is something that is purely up to you.
I do however recommend 2 books (possibly 3 or 4) that will help you greatly in reducing your learning curve and aid you in applying new concepts / ideas in real life situations:
1) Beginning ASP.Net e-commerce in c#. I have the 2005 edition. I'm not sure if there is a newer version or not.
2) Beginning asp.Net in C#.
3) Any beginners SQL book.
4) Any book for HTML / CSS.

If you have any questions or would like any advice let me know.
I used the first 2 books to help me build my first .Net website (https://www.theproductpad.com) and am very greatful for the help that these books gave me.

Good luck,
Michael


thanks

i remember the days when I wrote basic code for ZX Spectrum but now im a little lost!!

I will look into the books.

Aflo

Monday, March 26, 2012

Newbie client side JavaScript debugging issue

Hello.

I apologise for the potential stupidity of this question in advance.

After doing a lot of server side ASP.NET coding and debugging, I've
had to do a little bit of client side java script.

My problem is that I've made a mistake somewhere, and all the browser
tells me is "Error on page". I've tried setting break points inside
Visual Studio.NET, but they don't get "fired".

As a result of this, I don't have any idea what mistake/s I have made.

Basically, can someone please give this newbie some advice as to how I
can effectively debug and track down my client side javascript bugs
inside Visual Studio.NET

Thank you very much.

Robert.Does this help you?

http://support.microsoft.com/defaul...kb;en-us;317094
http://msdn.microsoft.com/library/d...application.asp
http://msdn.microsoft.com/library/d...ptdebugging.asp

--
Carsten Thomsen
Enterprise Development with Visual Studio .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
".NET Developer" <pleasereplytogroups@.hotmail.com> wrote in message
news:66900ea6.0308020327.dd6c318@.posting.google.co m...
> Hello.
> I apologise for the potential stupidity of this question in advance.
> After doing a lot of server side ASP.NET coding and debugging, I've
> had to do a little bit of client side java script.
> My problem is that I've made a mistake somewhere, and all the browser
> tells me is "Error on page". I've tried setting break points inside
> Visual Studio.NET, but they don't get "fired".
> As a result of this, I don't have any idea what mistake/s I have made.
> Basically, can someone please give this newbie some advice as to how I
> can effectively debug and track down my client side javascript bugs
> inside Visual Studio.NET
> Thank you very much.
> Robert.
Many thanks Carsten!
- Robert.

"CT" <carstent@.spammersgowaydotnetservices.biz> wrote in message news:<ueK3zuOWDHA.1480@.tk2msftngp13.phx.gbl>...
> Does this help you?
> http://support.microsoft.com/defaul...kb;en-us;317094
> http://msdn.microsoft.com/library/d...application.asp
> http://msdn.microsoft.com/library/d...ptdebugging.asp
> --
> Carsten Thomsen
> Enterprise Development with Visual Studio .NET, UML, and MSF
> http://www.apress.com/book/bookDisplay.html?bID=105
> ".NET Developer" <pleasereplytogroups@.hotmail.com> wrote in message
> news:66900ea6.0308020327.dd6c318@.posting.google.co m...
> > Hello.
> > I apologise for the potential stupidity of this question in advance.
> > After doing a lot of server side ASP.NET coding and debugging, I've
> > had to do a little bit of client side java script.
> > My problem is that I've made a mistake somewhere, and all the browser
> > tells me is "Error on page". I've tried setting break points inside
> > Visual Studio.NET, but they don't get "fired".
> > As a result of this, I don't have any idea what mistake/s I have made.
> > Basically, can someone please give this newbie some advice as to how I
> > can effectively debug and track down my client side javascript bugs
> > inside Visual Studio.NET
> > Thank you very much.
> > Robert.

Saturday, March 24, 2012

Newbie has coding problem (2 Qs)

Making a volunteer registration form using sproc and C# - integrated in the portal starter kit.

Code follows, then compiler error. Q. What is the better way to test for a null record? I know my HasRec variable is bad coding, but unsure how to use Isnull in C# against a SQL record.


<%@dotnet.itags.org. Page Language="c#" %>
<%@dotnet.itags.org. Register TagPrefix="portal" TagName="Banner" src="http://pics.10026.com/?src=~/DesktopPortalBanner.ascx" %>
<script runat="server"
int HasRec = 0;

void Page_Load(int userID)
{

// Check to see if data is in this userID rec and display if so
// create instance {new?}

SqlDataReader dr = profile.GetVolunteerProfilePageOne(UserID);

dr.read()

SalutationDropDownList.Text = (string) dr["Salutation"];
FirstNameTextBox.Text = (string) dr["Firstname"];
MiddlenameTextBox.Text = (string) dr["Middlename"];
LastnameTextBox.Text = (string) dr["Lastname"];
SuffixTextBox.Text = (string) dr["Suffix"];
AddressTextBox.Text = (string) dr["Address"];
AptNumberTextBox.Text = (string) dr["AptNumber"];
ZIPTextBox.Text = (int) dr["Zip"];
JurisdictionDropDownList.Text = (string) dr ["Jurisdiction"];
StateTextBox.Text = (string) dr["State"];
POBoxTextBox.Text = (string) dr["POBox"];
DOBTextBox.Text = (string) dr["DOB"];
SocialSecurityTextBox.Text = (string) dr["SocialSecurity"];

if Lastname != null {

HasRec = 1;
}

// Close datareader
dr.Close();

}

}

void FirstRegPageButton_Click(object sender, EventArgs e) {

if Hasrec = 0 {

// Add the profile within the profile table
profile.CreateVolunteerProfilePageOne ( UserID, SalutationDropDownList.Text, FirstNameTextBox.Text, MiddleNameTextBox.Text, LastNameTextBox.Text, SuffixTextBox.Text, AddressTextBox.Text, AptNumberTextBox.Text, ZIPTextBox.Int, JurisdictionDropdownList.Selection, StateTextBox.Text, POBoxTextBox.Text, DOBTextBox.Text, SocialSecurityTextBox.Text);
}
else {

// Update the contact within the contacts table
profile.UpdateVolunteerProfilePageOne ( UserID, SalutationDropDownList.Text, FirstNameTextBox.Text, MiddleNameTextBox.Text, LastNameTextBox.Text, SuffixTextBox.Text, AddressTextBox.Text, AptNumberTextBox.Text, ZIPTextBox.Int, JurisdictionDropdownList.Selection, StateTextBox.Text, POBoxTextBox.Text, DOBTextBox.Text, SocialSecurityTextBox.Text);
}
}

void Cancel_Click(object sender, EventArgs e) {

}

</script

Compiler Error:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0116: A namespace does not directly contain members such as fields or methods

Source Error:

Line 48: }
Line 49:
Line 50: void FirstRegPageButton_Click(object sender, EventArgs e) {
Line 51:
Line 52:

Source File: C:\Portal\PortalCSSDK\DesktopModules\VolRegistration.aspx Line: 50You are getting the compilation error because you have an extra closing bracket "}" at line 48 - remove it and it should work.

Hope that helps
Kashif
You can test for a null record with a SqlDataReader by the Read method's return value.

bool noRecords = dr.Read()

If noRecords is false, then there are no more records at the current position in the reader.

The way to test for a null field in a record is to test against DBNull.Value.

if (dr["LastName"] == DBNull.Value)
//field is null