Tuesday, June 9, 2009

How do I specify more than one parameter for my HyperlinkColumn?

How do I specify more than one parameter for my HyperlinkColumn?
================================================================
Many times will developing the applications we come accross the thing that how i can pass more then one parameter in the query string which is genertated by the datagrid or gridviews... once i was developing an application and the same problem came accross at that time i was quite new to ASP.net and was stucked there did lots of googleing and found the answer now today i want to share that piece of code as an example may be i may help you to avoid a bit burdden of yours to find the code

Here i have encoded the querstring or the URL to avoid some unwanted error which are normaly genertaed due to spaces and special characters.
the code follows like

[code]
< asp:DataGrid id="DataGrid1" runat="server" AutoGenerateColumns="False" >
< Columns >
< asp:TemplateColumn HeaderText="Sample Column" >
< ItemTemplate >
< asp:Hyperlink runat="server" Text=' < %#Container.DataItem("TextVal")% >' NavigateUrl=' < %# "page.aspx?Param1=" & Server.UrlEncode(Container.DataItem("Val1")) & "&Param2=" & Server.UrlEncode(Container.DataItem("Val2"))%>'/>
</itemtemplate >
</asp:TemplateColumn >
</columns >
[/code]




Thanks and regards
Meetu Choudhary

Monday, June 8, 2009

Shortcut Keys of Edit Menu in VS 2008

Check the follwoing Link
http://www.dotnetspider.com/resources/28921-Shortcut-Keys-Edit-Menu-VS.aspx

Organize Usings

Once we have created our class. In that class we use the using statment at the top of the class.To include namespaces in our class. But sometimes we realize after compeleting the code of that calss we have used some extra namespaces which are of no use in th class to remove all those unused using statment. we can use InteliSense in the edit menu. in the submenu of InteliSense we will find the option organize usings. and in its sub menu we hve the options to remove unused usings to sort usings and to remove and sort usings.


Thanks and Regards
Meetu Choudhary

Friday, June 5, 2009

Format document

To format any document (.cs,XML,aspx,HTML etc) in visual studio 2008
use the following key combinations:
To format whole document : ctrl +k ,(followed by) ctrl + d
To format the selection : ctrl +k, (followed by) ctrl +f




Thanks and Regards
Meetu Choudhary

Subscribe via email

Enter your email address:

Delivered by FeedBurner

MSDotnetMentor

MSDotnetMentor My Website http://msdotnetmentor.com