Posted by Ajay Matharu in .Net, Setup, Visual StudioJan 25th, 2010 | No Comments
One of my team member, kunal, was facing a problem while creating the setup project for v 20 using VS 2008. Even after just changing the target framework while creating the project did no help so had to search for the solution, and the solution that solved our problem is as follows,
1) Create a windows application project with target framework as v2.0
Select Target Framework
2) Create Setup and deployment project and select target framework as v2.0
Target Framework for Setup
3) Right-Click on setup project Name and select Properties, under properties select Prerequisites
Select Prerequistes
...
Posted by Ajay Matharu in .Net, ASP.Net, Chrome, Internet ExplorerJan 6th, 2010 | No Comments
ASP.Net menu controls breaks in Google Chrome and works fine in other browsers. Here is the hack to make it work in Google Chrome as well,
if (Request.UserAgent.IndexOf("AppleWebKit") > 0)
Request.Browser.Adapters.Clear();
Just add this code on your page load and the menu control will start working fine in Google Chrome as well.
Also some times the hover menus don’t work on IE8 to make it work on IE8 you need to set
“z-index”
in DynamicMenuStyle property of the menu control.
Hope this helps
Posted by Ajay Matharu in .Net, Development, Microsoft, Sharepoint, Visual StudioNov 27th, 2009 | No Comments
Last night while developing an event listener custom list, I ran into this error,
SharePoint Error: “The language-neutral solution package was not found”
The solution to this problem is, Restart your visual studio. And it will be back to normal.
Hope this helps
Posted by Ajay Matharu in .Net, ASP.Net, Visual StudioOct 9th, 2009 | No Comments
The .Net Framework has a feature called Shadow Copy.
Shadow copy is enabled on every appdomain created by ASP.NET by default. By default assemblies loaded will be copied to a shadow copy cache directory, and will be used from that location.
But this may create problem sometimes.
Posted by Ajay Matharu in .Net, ASP.Net, Development, Visual StudioOct 7th, 2009 | 1 Comment
Following code helps you to import grid values to excel,
//Import System.IO in your application for StreamWriter Object
//note: excel_file represents the complete physical address of excel file eg C:/myexcel.xls
public void export_datagridview_to_excel(DataGridView dgv, string excel_file)
{
int cols;
//open file
StreamWriter wr = new StreamWriter(excel_file);
//determine the number of columns and write columns to file
cols = dgv.Columns.Count;
for (int i = 0; i < cols; i++)
{
wr.Write(dgv.Columns[i].Name.ToString().ToUpper() + â\tâ);
}
wr.WriteLine();
//write rows to excel file
for...