Response.Write() for ASP.NET

26 09 2007

Use Response.Write() to create dynamic web pages.
ASP.NET allows to turn static HTML tags into objects -> server controls. 2 sets of server controls:

1) HTML server controls
Standard HTML elements.

2) Web controls
Properties for style and formatting details. More events and have web controls featuring some user interface elements that has no direct HTML equivalent (ie validation controls).

HTML server controls
Provide 3 key features:
1) Generate own interface.
2) Retain their state – don’t have to make sure every control on that page is refreshed. Done automatically.
3) They fire events – it is event based and responds to events. If the given event doesn’t occur the event handler code won’t be executed.

When generating a new web form in VS. (Website > Add New Item), there is a page directive. A page directive gives ASP.NET basic information about how to compile the page. It indicates the language you are using for your code and it will connect to the event handlers. (Preferably use code behind approach).





ASP.NET

26 09 2007

ASP.NET gets executed on the server and once this is finished, user receives HTML page that can be viewed in any browswer.
Why ASP.NET? Why not ASP?
ASP has scripting limitations. Relied on VB script language and has poor performance. ASP cannot be reused. Updating components in ASP website require the manual restarting of the server. Not practical if the server needs to be on 24/7.

ASP.NET hosts web applications, web services and web specific services. Classes interaction is via 3 ways: properties, methods and events. For ASP.NET you create own classes to represent individual web pages. It uses event driven programming model reacting to events.

ASP.NET uses a higher level model of server side web controls. Controls are created and configured as objects and automatically provided with their own HTML output. ASP.NET applications are divided into multiple web pages. The application is executed in its own area (buzzword: application domain). If it crashes it would not affect other applications running on same computer. Each web application is maintained separately with own set of cached, session data, application, etc.

———————————————

Common file names:

xxx.aspx
ASP.NET web pages. Contain user interface.

xxx.ascx
ASP.NET user controls. Cannot be accessed directly. It is hosted inside an ASP.NET web page (ie xxx.aspx).
Allows development of small piece of user interface and be reused in as many web forms as wanted.

xxx.asmx
ASP.NET web services. They share the same application resources, configuration settings and memory but work differently than web pages.

web.config
XML based configuration file for ASP.NET application.
Settings for customized security, state management, memory management.

global.asax
Global application file. Defines global variables access from any web page in teh web application and react to global events.

xxx.cs
Code files containing c#. Allow you to separate application from user interface of a web page.





A Look At The Timeline

26 09 2007

HTML page in the past was what they taught me in high school as web designing. A word processing document containing information that didn’t do anything at all.
Then came HTML forms where you have dropdown lists and text boxes and buttons (aka form controls). An attempt for some user interaction purposes.

Server side programming 
ASP and ASP.NET allow the programming of dynamic web pages without worrying about the low level implementation details. ASP and ASP.NET are different.
ASP is a script based programming language. It needs a thorough understanding of HTML and coding.
ASP.NET is object oriented programming (OOP) model. Easier to use and more powerful.

Client side scripting
Involved having applets and embedded multimedia (Javascript, DHTML, Java code). The whole application is downloaded to the client browswer which executes it locally. There is no need of setup during the deployment process. Disadvantage is that it is not supported by all browsers and operating systems(OS) (compatibility issues). Testing is needed across different OS and browsers.





Quote THEM!

26 09 2007

“Instead of giving a politician the keys to the city, it might be better to change the locks.”

- Doug Larson





Praying Monks

26 09 2007

News headlines taken from:
http://hosted.ap.org/dynamic/stories/A/AS_GEN_MYANMAR_PROTESTS_ASOL-?SITE=ASIAONE&SECTION=SPECIAL&TEMPLATE=DEFAULT&CTIME=2007-09-26-05-26-46 for
Sep 26, 5:26 AM EDT

Buddhist monks, protesters defy Myanmar junta’s ban on assembly; police fire warning shots

YANGON, Myanmar (AP) — Security forces fired warning shots and tear gas into massive crowds of demonstrators in Myanmar’s biggest city Wednesday, while hauling away defiant Buddhist monks into waiting trucks – the first mass arrests since protests in this military dictatorship erupted last month.

About 300 monks and activists were arrested across Yangon after braving government orders to stay home, according to an exile dissident group, and reporters saw a number of monks, who are highly revered in Myanmar, being dragged into trucks.

A Norway-based dissident radio station, the Democratic Voice of Burma, said that one monk was killed and several injured in clashes in downtown Yangon. The death could not be confirmed by other sources.

The junta had banned all public gatherings of more than five people and imposed a nighttime curfew following eight days of anti-government marches led by monks in Yangon and other areas of the country, including the biggest protests in nearly two decades.

A march toward the center of Yangon followed a tense confrontation at the city’s famed Shwedagon Pagoda between the protesters and riot police who fired warning shots into the air, beat some monks and dragged others away. They also fired tear gas.

About 5,000 monks and 5,000 students along with members of detained opposition leader Aung San Suu Kyi’s pro-democracy party set off from Shwedagon to the Sule Pagoda in the heart of Yangon, but were blocked by military trucks along the route.

Other protesters at the Sule Pagoda were confronted by warning shots.

Some carried flags emblazoned with the fighting peacock, a key symbol of the democracy movement in Myanmar. The march proceeded quietly with protesters praying rather than chanting.

About 100 monks stayed behind at the eastern gate of the Shwedagon, refusing to obey orders to disperse after riot police there failed to dislodge them with tear gas, batons and warning shots.

Witnesses said an angry mob at the pagoda burned two police motorcycles.

A branch of Suu Kyi’s National League for Democracy exiled in Thailand said 300 people had been arrested in Yangon, most of them in a western suburb of the city. The number could not be independently confirmed.

Soldiers with assault rifles had earlier blocked all four major entrances to the soaring pagoda, one of the most sacred in Myanmar, and sealed other flash points of anti-government protests.

A comedian famed for his anti-government gibes became the first well-known activist rounded up following the protests.

Zarganar, who uses only one name, was taken from his home overnight by authorities. His family said Wednesday they were told he had been “called in for temporary questioning.”

Zarganar, along with actor Kyaw Thu and poet Aung Way, led a group providing food and other necessities to the protesting monks. He had earlier been imprisoned twice and his comedy routines banned for their satirical jokes about the regime.

The fates of the actor and poet were not immediately known.

Myanmar’s leaders warned monks to stop the protests after some 100,000 people joined marches in Yangon on Monday in the largest anti-government demonstrations since a 1988 pro-democracy uprising was violently suppressed.

The junta imposed the 9 p.m.-to-5 a.m. curfew and ban on public assembly after 35,000 people monks and their supporters defied the warnings to stage another day of protests Tuesday.

The demonstrations started Aug. 19 after the government hiked fuel prices in one of Asia’s poorest countries. But they are based in deep-rooted dissatisfaction with the repressive military rule that has gripped the country since 1962.

In Mandalay, Myanmar’s second largest city, more than 800 monks, nuns and laymen played a cat-and-mouse game with some 100 soldiers who tried to stop them marching from the Mahamuni Paya Pagoda, which they had tried to enter earlier.

“We are so afraid, the soldiers are ready to fire on civilians at any time,” a man near the pagoda said, asking that his name not be used for fear of reprisals.

If the military responds to new protests with force, it could further isolate Myanmar from the international community. It would almost certainly put pressure on Myanmar’s top economic and diplomatic supporter, China, which is eager to burnish its international image before next year’s Olympics in Beijing.

If monks who are leading the protests are mistreated, that could outrage the predominantly Buddhist country, where clerics are revered. But if the junta backs down, it risks appearing weak and emboldening protesters, which could escalate the tension.

There are about 500,000 monks and novices in Myanmar.

When faced with a similar crisis in 1988, the government brutally suppressed a student-led democracy uprising. Soldiers shot into crowds of peaceful demonstrators, killing thousands.

Foreign governments and religious leaders have urged the junta to deal peacefully with the situation. They included the Dalai Lama and South African Archbishop Desmond Tutu, both Nobel Peace Prize laureates like Suu Kyi.

U.S. President George W. Bush announced new U.S. sanctions against Myanmar, accusing the military dictatorship of imposing “a 19-year reign of fear” that denies basic freedoms of speech, assembly and worship.

Bush said the U.S. would tighten economic sanctions on leaders of the regime and their financial backers, and impose an expanded visa ban on those responsible for human rights violations and their families.

The European Union also threatened to strengthen existing sanctions against the regime if it uses violence to put down the demonstrations.

Britain’s ambassador to Myanmar, Mark Canning, met Tuesday with some of Myanmar’s leaders, urging continued restraint. Canning said he told ministers that the “demonstrations have been peaceful and well-disciplined.”

“It will be disastrous in the eyes of the world on Myanmar if the authorities use force,” he told them, saying that they assured him the situation would be handled with caution.
————————————

It is classified as the “biggest anti-government demonstrations since 1988″ by the Canadian Press. From reading all the articles lately, you hear about all the junta forcing violence to disperse the peaceful protests. Monks have gotten injured in the process. For those who don’t know who the “junta” are, by looking at Yahoo Answers Skidoo states that, “A junta is a group of military officers ruling a country after seizing power.”

What are they fighting for? As Jurgen Kremb says, “…it seems the people’s patience is at an end. The junta is making billions out of the country’s natural resources and living in the lap of luxury even as galloping inflation causes severe poverty for most of the population. A third of all children in Myanmar suffer from malnutrition.”
So why is it wrong for them to fight for what they believe in and be treated the way they are?

I am not very good with political issues but after seeing this issue all over the news, I can’t but feel how humans can be so cruel. Why do we do such things? How do you feel about this issue?





Peer Pressure

26 09 2007

Question:
What happens when your cousins and your elder sister starts to get married? Not only one cousin but two!
Answer:
You get thrown the inevitable question of,
“When will it be your turn?”

I often don’t know how to associate my facial expressions in this kind of scenario. Theoretically they are just wanting me to spill my guts out about the guy I am dating but probem is I ain’t dating anyone. I wonder if I just came out with the truth if they will be in shock and just stop asking me. Is it bad that I don’t want to get married? At this moment I just want to finish my studies and get myself into the industry and focus on my career. Is it bad that I want a career more right now?
I don’t know but I find that these are one of those things that are better left unsaid. Times where I just nod and just let all the relatives say what they want and have their minds formulate stories to satisfy their own queries.





Sick…

26 09 2007

There can only be 2 reasons why I have fallen sick…
1) Someone passed it to me *give evils to my second sister* or
2) The changing of hot and cold environment I forced my body to endure.
There could be another reason… I ate too many mooncakes?

My mum says its lack of exercise and truth be told, I think its all of the above. My immune system is totally haywired from the start. How does one get a cold when the weather is so hot? And what tops it off is I have the whole works… and it has been 3 days and its gotten from bad to worse. (Will not tell you what measurable calculations I used to determine that I have gotten from bad to worse – use your imagination).

I have the ear infection, throat infection and running nose. HELLO! How in the world does someone get a flu in TROPICAL weather? More time wasted for sleeping even though I love to sleep. The work never seems to stop and is piling up so sleep right now doesn’t seem the best option for me.

Had a hair cut on Saturday. Got it cut really really short by Yoou, my regular bestest hairdresser I always go to (Is there such a word as bestest?). I like what she does and if you want to get a cut you need to book an appointment with her. I had her cut it really short because the weather has been really hot lately.

It’s like a boy haircut but I like it and it makes my head so much lighter. Bonus part is I don’t have to use so much shampoo. On the downside, I have to wake up earlier to style my hair even though I do the messy look. Bad part is the gel that I am using now ain’t very good so making the messy look has been hell for me.

Current gel brand I am using is some American brand and it’s green in color. It’s called Ritzo Creatic Styling Gel. After a while my hair starts to flop using that product so I don’t think its very good. She suggested I get L’Oreal Remix. Might check it out before class today.