Thursday, November 30, 2006

SelectedValue in DropDownList without Viewstate

In a webpage we have 5 dropdownlist in each dropdownlist hundreds of records were available, So when we request the page it will take approx 30 sec’s to load all the dropdownlist. This page is used to launch crystal report. When we select a value in the dropdowlist and pass the value as parameter to the crystal report. Which take 2 mins to load a report. The time taken is huge, We need to optimize this process.

First I investigated the server by running the sql profiler to trace the longest query but I couldn’t find one, all the queries executed in seconds. Then I guessed it should be problem in the client request, so I downloaded a HTTP Debugger to trace the request and response. Then I found that while requesting the report 330 kb data was posted from client to server. (Pretty High!!!)

When I checked the source of the webpage I found 330 kb of Viewstate data, so this was postbacked when the report was requested. To avoid the viewstate data I disabled the viewstate for dropdownlist’s but unable to get the selectedvalue. I thought changing the dropdownlist server control to selection box(html) which little difficult process, Later I googled and googled until get succeeded. I found answer how to get the selectedvalue of the dropdownlist without viewstate in blog.

Using request.form(dropdownlist_name.uniqueid) will give us the selectedvalue of the dropdownlist without viewstate (disabled). After implementing this the reports are launched less than 10 secs which is a tremendous performance difference.

Thursday, November 16, 2006

Two Wheeler Theft - My Experience

My Two wheeler (hero honda splendor) has been stolen by someone. I was using that vechile for more than 4 yrs but this happened in few minutes. I went to adyar to meet my friend so i parked the bike in the service lane which is parking area in 1st main road KB nagar, also my bike was parked next to traffic surgent motor bike and we went to a tea shop opposite side crossing the road. The tea shop near to traffic jam hotel around 7.00 pm . when we came back around 7.20 pm my motor bike was not there, where i parked. I got shocked!. I thought police might took so i went to a traffic constable who is on duty there and asked whether any recovery vechile took my bike. he said no then he said your bike should be missing please check near by area's. He came to service lane and kept his motor bike at safe place. Also some near the spot said some body took by mistake please wait for sometime and register a complaint. We waited more than hour but no luck.

I went to police station said my bike is missing they asked me is it in finance? i said no, they asked all the particulars about my bike and name sake they have noted it to a rough notebook in pencil and asked me to meet Inspector. He also asked some question's but not ready to register complaint. He asked me give the details and go we will check tonight in patrol he said. again i went back to writer room, there next shift people came in and asked me details again noted in rough notebook again.

Motor Bike missing is very common activity in chennai no one was surprised. They asked come next day. but no luck to register a complaint. Next day i called the insurance office to inform that my bike is missing. My bike is insured with 'TATA AIG'. They immediately asked whether i parked my bike in parking area and locked. I said yes i parked my bike in parking area and locked. They given me a claim no.

I received a letter and claim form from TATA AIG, I thought private insurance acting quickly but when i read the letter i understood it will take more than 3 months to get my claim. Since the process is like that after getting the non-traceable certificate from Police only we can get the claim.

I got frustrated to know and understand the procedure practically. I will list the procedure's here...

1) Goto police station (with your vechile details but they won't accept immediately this is common don't worry).
2) Inform Insurance company.
3) Write a letter to RTO where you registered stating don't transfer your vechile to anyone since it has been stolen.
4) Follow-up Police station until you get the FIR copy.
5) With FIR copy, RC, Insurance policy copy submit to Insurance company and forgot it for 2 - 3 months
6) After getting NTC(Non-Traceable Certificate) goto insurance office sign T.O. form(29,30)

Now i bought a bi-cycle but still i feel restless when i park in a shop's/hotel's etc... One thing i understood in this experience we should not have a vechile which has resale value is high(Splendor, Qualis etc..) If we have this kind of vehiles we should take extra measures to avoid such disaster's. Please be careful n enjoy life!