Generally, we are binding code with Gridview like this:
Gridview1.Datasource = dataset;
GridView.DataBind();
After that our page loads data and it looks ok, but when we look into view source of the page.
We see something like this.
Step 3: Now Add ASP.Net folder “App_Browsers” in your solution. Right click on this folder and click on Add new Item. Once the installed template dialog box appears, select “Browser File” from given list.
Step 4: Now replace below code in .browser file that you added in the last step
<browsers>
<browser refID=”Default”>
<controlAdapters>
<adapter controlType=”System.Web.UI.Page” adapterType=”PageAdapterServices“/>
</controlAdapters>
</browser>
</browsers>
Note : adapterType=”PageAdapterServices” here PageAdapterServices is the name of class.
Now run your page and see view source, you will find the difference.
Enjoy 🙂
Nice Post.
I was actually searching for this material to implement on my website.
You saved my time. Thanks.