Thursday, March 12, 2009

Server-side comment & Client-side comment

While programming, I use the comment/un-comment menu in the Visual Studio toolbar. The commented portion looks like, for example

<%-- Some Comment/Code here --%>

Later on only, I paid attention to it; as what makes it different from our normal HTML comments like;

<!-- Some Comment/Code here -->

The difference is simple. The former is called server-side comment & the latter is client-side comment. Serer-Side comments are not returned to the browser, while the client-side comments are returned to the browser.

Realizing, how I strained/managed to learn complex codes, without paying attention to such a silly thing. We all need Big without realizing what is Small.

Wednesday, March 11, 2009

EnableDecompression in ASP.NET WebService

Suppose that the Web Server from which a Web-Service client is requesting Web-Service supports compression; then the web-service client will receive respone as compressed data.

We can disable the decompression by setting the EnableDecompression property to true.

// on client web-application
Service srvc1 = new Service();
srvc1.EnableDecompression = true;
 
// call your web-service method here (example)
string dtime = srvc1.ReturnDateTime();
:
:
:

Tuesday, March 10, 2009

IE Bookmark Sync

As I’s busy with my programming world, I came across a lot of articles, bookmarked a lot of pages. Formatting my PC was a real headache for me, as I’ll be losing my bookmarks. Since, I’s using IE (currently using IE8 RC1) as my default browser, I cannot think about using FF for syncing the favorites using FoxMark.

As the FoxMark download crossed 13 million, they planned to extend the service to IE & Safari. Though, the FoxMark was for IE 6 & 7; I tried it for IE8 RC1. Charmingly, it worked.

I must say, it’s a must have for fellows who bookmarks a lot.

Download it here.

I’m on 1000+

profile

Just now only I noticed that i scored a 1000+ points in the Microsoft official ASP.NET forum. Happy to see that I’ve helped some developers. Also happy, I got some new techies too.

Thanks.

Edit/Update/Delete GridView automatically

There is an easy way to edit/delete/update rows in a GridView data control.

All you have to do is:

a) Configure SQLDataSource data-control.

b) Select a table.

c) Select column-field(s) including the primary-key column.

d) To the right, click on the Advanced button & select ‘Generate INSERT, UPDATE and DELETE statements’.

sqldatasource_auto_updatedeleteedit

c) Click Next; test-query & click Finish.

Now, go back to your GridView. On the smart-tag, select ‘Enable Editing’ and ‘Enable Deleting’.

gridview_ebanle_autohandling

That's it. Now run the page, try to editing/updating/deleting the records. Leave everything to SQLDataSource. You are hands free now.

How easy, isn't it ?

 
Best viewed in Internet Explorer 8.