| Tips and Tricks | |
1. |
To enable debug operation in SharePoint server web part, follow the following steps i. Open web.config file of the SharePoint web site in which you want to make debug mode. ii. Make callStack "false" to "true" inside of <SafeMode> tag iii. Set Custom Error mode to "Off" inside of <customErrors> tag. iv. Set Compilation batch "false" to "true" and debug "false" to "true" in <compilation> tag. |
2. |
Fetching multiple SQL query at one time and store in dataset tables. // Set SQL query to fetch projects // Create dataset // Populate dataset // Set dataset table names |
3. |
Sorting DataTable if it is not binding to controls(using dataview) Here, main Data Table is objDataTable, It will in sorting by the column 'sd_planned' in ascending after following coding. //Sorting Data Table |
4. |
Using JavaScript in ASP.NET and handling enter key from the client side. <script language="javascript" type="text/javascript"> For use JavaScript in ASP.NET in dynamic way (Code Behind), we have to call attribute method of the control using following codings TextBox1.Attributes.Add("onkeypress", "return clickButton(event,'" + Button1.ClientID + "')"); |
5. |
How to display MS Visio file in SharePoint WebPart? <OBJECT classid="CLSID:279D6C9A-652E-4833-BEFC-312CA8887857" |
5. |
How to Create User Control from Web Page (.aspx to .ascx) In addition to explicitly creating a user control, we can also convert a Web page to a user control. The primary benefit is that we can do our prototyping and testing without having to deal with placing the control on a Web page. - Remove the <html>, <body>, and <form> begin and end tags. |
6. |
Raising events from user control to web page Rasing events from user control to a web page, we can pass any processed value from user control to web page. Download the solution project |
7. |
[SQL Server] Exporting records from the selection of columns and records from various tables. The following sql code format should be used to export or create table with records from the selection of columns and records from various tables. In this sql, the different columns are taking from different three tables and also selected set of records. The records from this selection query will be stored in table named 'NewTableName'. Select Table1.Col1, Table2.Col2, Table3.Col |
Sunday, March 30, 2008
SharePoint and .net Tips and Tricks
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment