Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Saturday, March 24, 2012

Newbie: Where to start

Hi

I have an asp background. I need to start a long term project with access
backend that would be evolved over a period of time. A flexible and easily
extensible infrastructure is highly desirable. Is there a site that I can
use as model of good practices or a template that I can start with?

Thanks

Regardshttp://www.asp.net/Default.aspx?tabindex=0&tabid=1

"John" <john@.nospam.infovis.co.uk> wrote in message
news:OQ8QxxOwDHA.1740@.TK2MSFTNGP09.phx.gbl...
> Hi
> I have an asp background. I need to start a long term project with access
> backend that would be evolved over a period of time. A flexible and easily
> extensible infrastructure is highly desirable. Is there a site that I can
> use as model of good practices or a template that I can start with?
> Thanks
> Regards
Hi

I am using vs.net 2003 to develop in vb.net. I just don't know how to
structure a good asp.net app as it would be my first. I need to know how to
implement modularity in asp.net so things can be extended easily as the app
develops. Also any tips on saving time on development/maintenance by using
things like templates etc.

Thanks

Regards

"TJS" <nospam@.here.com> wrote in message
news:OwAA3PPwDHA.1088@.tk2msftngp13.phx.gbl...
> http://www.asp.net/Default.aspx?tabindex=0&tabid=1
>
> "John" <john@.nospam.infovis.co.uk> wrote in message
> news:OQ8QxxOwDHA.1740@.TK2MSFTNGP09.phx.gbl...
> > Hi
> > I have an asp background. I need to start a long term project with
access
> > backend that would be evolved over a period of time. A flexible and
easily
> > extensible infrastructure is highly desirable. Is there a site that I
can
> > use as model of good practices or a template that I can start with?
> > Thanks
> > Regards
Thats a lot to be requesting advice on given your on about moving to an OO
based approach.

I woudl strongly suggest that you buy a book to assist you.

Try
http://aspalliance.com/cookbook/default.aspx

Or Dino Esposito's Programming Microsoft ASP.NET

--
Regards

John Timney (Microsoft ASP.NET MVP)
--------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
--------------

"John" <john@.nospam.infovis.co.uk> wrote in message
news:#sSeyZPwDHA.2440@.TK2MSFTNGP12.phx.gbl...
> Hi
> I am using vs.net 2003 to develop in vb.net. I just don't know how to
> structure a good asp.net app as it would be my first. I need to know how
to
> implement modularity in asp.net so things can be extended easily as the
app
> develops. Also any tips on saving time on development/maintenance by using
> things like templates etc.
> Thanks
> Regards
>
> "TJS" <nospam@.here.com> wrote in message
> news:OwAA3PPwDHA.1088@.tk2msftngp13.phx.gbl...
> > http://www.asp.net/Default.aspx?tabindex=0&tabid=1
> > "John" <john@.nospam.infovis.co.uk> wrote in message
> > news:OQ8QxxOwDHA.1740@.TK2MSFTNGP09.phx.gbl...
> > > Hi
> > > > I have an asp background. I need to start a long term project with
> access
> > > backend that would be evolved over a period of time. A flexible and
> easily
> > > extensible infrastructure is highly desirable. Is there a site that I
> can
> > > use as model of good practices or a template that I can start with?
> > > > Thanks
> > > > Regards
> >
Yes, templates can be used with ASP.net

To incorporate modularity build your code in classes.

--
================================
http://www.ASPkey.net/
A Resource Site for Web Developers
*Free OnLine web Tools
*Free development services
================================

"John" <john@.nospam.infovis.co.uk> wrote in message
news:%23sSeyZPwDHA.2440@.TK2MSFTNGP12.phx.gbl...
> Hi
> I am using vs.net 2003 to develop in vb.net. I just don't know how to
> structure a good asp.net app as it would be my first. I need to know how
to
> implement modularity in asp.net so things can be extended easily as the
app
> develops. Also any tips on saving time on development/maintenance by using
> things like templates etc.
> Thanks
> Regards
>
> "TJS" <nospam@.here.com> wrote in message
> news:OwAA3PPwDHA.1088@.tk2msftngp13.phx.gbl...
> > http://www.asp.net/Default.aspx?tabindex=0&tabid=1
> > "John" <john@.nospam.infovis.co.uk> wrote in message
> > news:OQ8QxxOwDHA.1740@.TK2MSFTNGP09.phx.gbl...
> > > Hi
> > > > I have an asp background. I need to start a long term project with
> access
> > > backend that would be evolved over a period of time. A flexible and
> easily
> > > extensible infrastructure is highly desirable. Is there a site that I
> can
> > > use as model of good practices or a template that I can start with?
> > > > Thanks
> > > > Regards
> >

Thursday, March 22, 2012

Newbie-Q: 403 Error

I'm just getting started with ASP.NET. I got a 403 error the first time I
tried to run a web site in VS 2005, so I did two things:
1) I confirmed that the IIS default web site was configured for anonymous
access in the MMC Authentication Methods dialog.
2) I gave the Internet Guest account read and write permissions on the
Inetpub\wwwroot folder.
Do I need to do anything else to configure ASP.NET for IIS or for NT file
access? Are there any articles that discuss this aspect of security? Thanks.I spoke too soon-- I'm still getting the 403 error

Newbie-Q: 403 Error

I'm just getting started with ASP.NET. I got a 403 error the first time I
tried to run a web site in VS 2005, so I did two things:

1) I confirmed that the IIS default web site was configured for anonymous
access in the MMC Authentication Methods dialog.

2) I gave the Internet Guest account read and write permissions on the
Inetpub\wwwroot folder.

Do I need to do anything else to configure ASP.NET for IIS or for NT file
access? Are there any articles that discuss this aspect of security? Thanks.I spoke too soon-- I'm still getting the 403 error

newbies question about date and time

I asked this question as an additional question in another thread but still getting no answer yet. Hopefully someone can give some advises.

The case I have here is I need to keep business hours in my sql database. Apparently I only need hh:mm. The way that I did was:
1. create 2 datetime fields in sql table to stroe the from and to.
2. in the maintenance form, create text fields to capture only hh:mm from user.

First of all, is it a right way to do? I mean, is it appropriate to use datetime field to store or I should use a string field to do so? Please note that the data are not used for display only.

I entered the hours thru Server Explorer in vs2003 prior to the maintenance form was created. It did allow me to enter only hh:mm to the cells. But when I examined the data in those fields during debugging, I found actually there is a date prior to the time.

My question is when I use vb code to update those fields, what should I put in the date portion. I don't think I can simply code like "table.FromField=txtFrom.text" and do a sql update.

Can someone advice me what is the proper way to get this done? Thanks a million.You can certianly do it the way you've done it thus far. However, date/time fields in sql have all kinds of additional features on them to calculate the date and time.

If you're simply looking for time in a specific format I would setup a char(5) or a VarChar(5) field and put the string in there. Then use a regular expression to validate it at the user interface.

But, like I previously said, you can certianly do it the way you did without issues.

Hope this help,
But then my issue is how to update the sql table in the future. As I said, I entered the dates thru vs2003 in the first set up. Down the road, if the user needs to change, I think the web form will crash out because trying to populate a datetime field without data in date portion. Would you agree with me?
Are you saying that you auto generated a form off of an sql table?
Sorry I confused you. I mean I created the table first and because there is just only one record in it so I simply entered data thru vs2003.
Now I am creating a form for my user to maintain info in that table. So if the user brings up the form, the text field will show 10:45 in that text fields.
Apparently when the user click save button, I'd have update the table with what is on the form. Then how am I going to update the datetime field with just a time. I have though about to concatenate it with a dummy date but it sounds very stupid and unprofessional.
Use the full date time functionality in SQL -

and format the output (displayed) to what you need...

thats the real way to accomplish the task...

good luck

take care
tony
Thanks Tony. I'm going to do research to see what the function you mentioned really does 'cause I'm at not well-versed in SQL. But I got a feeling that you meant to populate the entire date and time to the table, if this is true then what date I should put it in? Is my case very rare?
I couldn't find any date time functionalities to handle this situation except I found a page in MSDN about using data and time. It said ...

There are no separate time and date data types for storing only times or only dates. If only a time is specified when setting a datetime or smalldatetime value, the date defaults to January 1, 1900. If only a date is specified, the time defaults to 12:00 A.M. (Midnight).

In the mean time, I can only concatenate 1/1/1990 with user's input while updating the database. Does anybody have a better idea? Thanks.

Newbiew use of DropDownList.

Hi,
I think this is the first time I put a dropdownlist in a web form, it
correctly displays the values from the database and when I save the
form I'm able to save the corresponding value to the database. But when
I use the form to display data, the listbox does not automatically
display the value saved in the database of course, so how am I supposed
to make point to the saved value ?Hi,
You can do it one of two ways.
(after ddl is populated)
DropDownList.SelectedIndex =
DropDownList.Items.IndexOf(DropDownList.Items.FindByText(MyDataReader("Field
Name")))
or
(if before ddl is populated)
DropDownList.DataTextField=MyDataReader("FieldName")
I hope this helps.
Mike Douglas
On 26 Mar 2005 16:17:20 -0800, craigkenisston@.hotmail.com wrote:

>Hi,
>I think this is the first time I put a dropdownlist in a web form, it
>correctly displays the values from the database and when I save the
>form I'm able to save the corresponding value to the database. But when
>I use the form to display data, the listbox does not automatically
>display the value saved in the database of course, so how am I supposed
>to make point to the saved value ?

Newbiew use of DropDownList.

Hi,

I think this is the first time I put a dropdownlist in a web form, it
correctly displays the values from the database and when I save the
form I'm able to save the corresponding value to the database. But when
I use the form to display data, the listbox does not automatically
display the value saved in the database of course, so how am I supposed
to make point to the saved value ?Hi,

You can do it one of two ways.

(after ddl is populated)
DropDownList.SelectedIndex =
DropDownList.Items.IndexOf(DropDownList.Items.Find ByText(MyDataReader("FieldName")))

or

(if before ddl is populated)
DropDownList.DataTextField=MyDataReader("FieldName")

I hope this helps.

Mike Douglas

On 26 Mar 2005 16:17:20 -0800, craigkenisston@.hotmail.com wrote:

>Hi,
>I think this is the first time I put a dropdownlist in a web form, it
>correctly displays the values from the database and when I save the
>form I'm able to save the corresponding value to the database. But when
>I use the form to display data, the listbox does not automatically
>display the value saved in the database of course, so how am I supposed
>to make point to the saved value ?

Friday, March 16, 2012

newline in constant error

Hi,

I've been getting this error for a long time and haven't been able to figure it out. Up until now I've been doing workarounds to avoid this type of error, but I want to figure out how to fix it without the workarounds.

The error is:
CS1010: Newline in constant

And this is the code:

string scriptString = "<script language=\"JavaScript\" src=\"";
scriptString += appPath + "/js/popupmenu.js\"></script>";

The thing I really don't get is that if I put this exact same code in a cs file it compiles, but if I put it between script tags in an aspx file the error occurs...Hm, I found the answer for anyone who's interested:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;827420

However, why is this behavior by design? Shouldn't the error message be more specific if you're not supposed to put </script> in a string?

Thanks to anyone if they replied before this message gets approved.
Can you show us the full error (including the 5 lines of code that it shows)? There might be more to it.

news website

I am going to run an website publishing news and article. I would like to be able to MANAGE articles accoring to their topic and time. I would like to know if :
1) Is there any software to do that work
2) Database can store short text ( at least what I have been working with, less than 60 characterBig Smile [:D]) but is it possible to store the whole article as an entry in database.
3) If both answer to 1 and 2 is NO, what is the common way that website like what I am intending to run would do.
Regards.

umala wrote:

2) Database can store short text ( at least what I have been working with, less than 60 characterBig Smile [:D]) but is it possible to store the whole article as an entry in database.


I'm not sure about software that will do this for you, but you can use a SQL Server database to store your articles depending on the length. Using the varchar datatype you can store anything from 1 to 8000 characters. If your articles will fit within this range, this would be the best solution because you can add columns for both topic and time or date, which you can then sort them through your database query.
Hope this helps somewhat,
smtraber