2
Answers

Need help to create a web site

sarkaft

sarkaft

14y
1.5k
1
Hi..!
I need help with selecting which tool or which way to create a web page with. A web site where users can register and post ads for sale of used cars, houses, or rental of houses and sell other things like used computers, mobile phones etc..
I thought of creating a web page with asp.net and use a three-layer architecture. with presentation layer, business layer and dataacsesslayer. If I'm not mistaken there are some who call it the frontend-backend.
I was wondering if this is a correct way to create such a website with.? Are there any other ways to do it, such as MVC.? Or if there are Finished models in asp.net that one can customize for its own use like Joomla have..?
I would be grateful for any help.

Answers (2)
0
Vulpes

Vulpes

NA 98.3k 1.5m 10y
Accepted
1
Niranjan Poddar

Niranjan Poddar

NA 308 39.7k 10y
try this........

 public static string ConvertNumbertoWords ( int number )
    {
        if ( number == 0 )
            return "Zero";
        if ( number < 0 )
            return "minus" + ConvertNumbertoWords ( Math.Abs ( number ) );

        string words = "";
        if ( ( number / 1000000 ) > 0 )
        {
            words += ConvertNumbertoWords ( number / 1000000 ) + " MILLION ";
            number %= 1000000;
        }
        if ( ( number / 1000 ) > 0 )
        {
            words += ConvertNumbertoWords ( number / 1000 ) + " THOUSAND ";
            number %= 1000;
        }
        if ( ( number / 100 ) > 0 )
        {
            words += ConvertNumbertoWords ( number / 100 ) + " HUNDRED ";
            number %= 100;
        }
        if ( number > 0 )
        {
            if ( words != "" )
                words += "AND ";
            var unitsMap = new[] { "ZERO", "ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "ELEVEN", "TWELVE", "THIRTEEN",
                "FOURTEEN", "FIFTEEN", "SIXTEEN", "SEVENTEEN", "EIGHTEEN", "NINETEEN" };
            var tensMap = new[] { "ZERO", "TEN", "TWENTY", "THIRTY", "FORTY", "FIFTY", "SIXTY", "SEVENTY", "EIGHTY", "NINETY" };

            if ( number < 20 )
                words += unitsMap[number];
            else
            {
                words += tensMap[number / 10];
                if ( ( number % 10 ) > 0 )
                    words += " " + unitsMap[number % 10];
            }
        }
        return words;

    }
    protected void btnConvert_Click1 ( object sender, EventArgs e )
    {
        string word = ConvertNumbertoWords ( Convert.ToInt32 ( txtFig.Text ) );
        lblWord.Text = word;
    }