Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
V

Vipul Mehta

@Vipul Mehta
About
Posts
97
Topics
64
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Recommendations on VB.Net to C# code conversion tool
    V Vipul Mehta

    All our projects are written in C#. Hence wanted to convert these 2 apps to C#.

    Regards, Vipul Mehta

    Visual Basic csharp visual-studio tools

  • Recommendations on VB.Net to C# code conversion tool
    V Vipul Mehta

    We have couple of projects (1 win forms and 1 web form) written in VB.Net. We would like to get those converted into C#. We would be using VS 2012 Professional for BUILD. I am already googling for such tools but would also like to take community's opinion/recommendation on any such highly recommended tools with highest precision/accuracy in converting code from VB.Net to C#. I am good with free and paid tools. Your pointers/suggestions will be highly appreciated. Thanks in advance.

    Regards, Vipul Mehta

    Visual Basic csharp visual-studio tools

  • Recommendations on VB.Net to C# code conversion tool
    V Vipul Mehta

    So under which section would this question fall under?

    Regards, Vipul Mehta

    C# csharp visual-studio tools

  • Recommendations on VB.Net to C# code conversion tool
    V Vipul Mehta

    We have couple of projects (1 win forms and 1 web form) written in VB.Net. We would like to get those converted into C#. We would be using VS 2012 Professional for BUILD. I am already googling for such tools but would also like to take community's opinion/recommendation on any such highly recommended tools with highest precision/accuracy in converting code from VB.Net to C#. I am good with free and paid tools. Your pointers/suggestions will be highly appreciated. Thanks in advance.

    Regards, Vipul Mehta

    C# csharp visual-studio tools

  • Get records having different data in 2 rows
    V Vipul Mehta

    Got this resolved

    Create Table T1 (Col1 int, Col2 varchar(50))
    Insert into T1 Select 1001,'WA'
    Insert into T1 Select 1001,'CA'
    Insert into T1 Select 1002,'WA'
    Insert into T1 Select 1001,'WA'
    Select Col1 From
    (
    Select *,ROW_NUMBER()Over(partition by Col1 Order by Col1) RN
    From (Select Col1,Col2 From T1
    Group by Col1,Col2)T1
    )A Where RN>1

    Regards, Vipul Mehta

    Database database question

  • Get records having different data in 2 rows
    V Vipul Mehta

    I have 2 columns (Account Number & State) with follwing set of records in my table Acc No State 1001 WA 1002 NY 1002 NY 1002 NY 1003 CA 1003 CA 1001 CA 1002 NY I want to pull such Account Numbers that has multiple states associated with that account. Looking at the existing records, output should be as shown below 1001 1002 What query should I write to get this result set?

    Regards, Vipul Mehta

    Database database question

  • Incorrect Reporting Service instance name during SQL server 2005 SP3 installation
    V Vipul Mehta

    Hi, Some time back my machine (Win XP) got renamed from M4B-11-720-GXP to M4B-06-425-GXP. While inatalling MS SQL Server 2005 SP3, the installer still shows me the old Reporting Service instance name - M4B-11-720-GXP\ReportServer. As a result installation fails on the authentication windows since there is no such instance present on my machine. Is there any way to get rid of this issue? From where does it load the old instance name? Can we change that? Also is there any way to unselect the "Reporting Services" option from the previous screen? Your prompt response on this would be highly appreciated. Thanks in advance.

    Regards, Vipul Mehta

    Database database sql-server sysadmin security help

  • CSS not getting implemented on the jQuery dialog within IE8
    V Vipul Mehta

    Hi, I am new to jQuery. We are using jQuery ui.1.0 in our project. We are using jQuery to show the dialog box. It has CSS implmented for the dialog title and the content. The CSS works well within the dialog box when seen in IE6 but the CSS does not get implemented when the same dialog box is opened/diaplayed in IE8. Within the IIS I have added below header for the page where the dialogbox is been implemented. Header name => X-UA-Compatible Header value => ID=6 What other changes do I need to make in order to make this work in IE8 as well? Below is the .css code

    /* This file skins dialog */

    .flora .ui-dialog,
    .flora.ui-dialog {
    background-color: #e6f7d4;
    }

    .flora .ui-dialog .ui-dialog-titlebar,
    .flora.ui-dialog .ui-dialog-titlebar {
    border-bottom: 1px solid #d8d2aa;
    background: #ff9900 url(i/dialog-title.gif) repeat-x;
    padding: 0px;
    cursor: move;
    height: 28px;
    _height: 29px;
    }

    .flora .ui-dialog .ui-dialog-titlebar-close,
    .flora.ui-dialog .ui-dialog-titlebar-close {
    width: 16px;
    height: 16px;
    background: url(i/dialog-titlebar-close.png) no-repeat;
    position:absolute;
    top: 6px;
    right: 7px;
    cursor: default;
    }

    .flora .ui-dialog .ui-dialog-titlebar-close-hover,
    .flora.ui-dialog .ui-dialog-titlebar-close-hover {
    background: url(i/dialog-titlebar-close-hover.png) no-repeat;
    }

    .flora .ui-dialog .ui-dialog-title,
    .flora.ui-dialog .ui-dialog-title {
    margin-left: 5px;
    color: white;
    font-weight: bold;
    position: relative;
    top: 7px;
    left: 4px;
    }

    .flora .ui-dialog .ui-dialog-content,
    .flora.ui-dialog .ui-dialog-content {
    margin: 1.2em;
    }

    .flora .ui-dialog .ui-dialog-buttonpane,
    .flora.ui-dialog .ui-dialog-buttonpane {
    position: absolute;
    bottom: 8px;
    right: 12px;
    width: 100%;
    text-align: right;
    }

    .flora .ui-dialog .ui-dialog-buttonpane button,
    .flora.ui-dialog .ui-dialog-buttonpane button {
    margin: 6px;
    }

    /* Dialog handle styles */
    .flora .ui-dialog .ui-resizable-n,
    .flora.ui-dialog .ui-resizable-n { cursor: n-resize; height: 6px; width: 100%; top: 0px; left: 0px; background: transparent url(i/dialog-n.gif) repeat scroll center top; }

    .flora .ui-dialog .ui-resizable-s,
    .flora.ui-dialog .ui-resizable-s { cursor: s-resize; height: 8px; width: 100%; bottom: 0px; left: 0px; background: transparent url(i/dialog-s.gif) repeat scroll center top; }

    .flora .ui-dialog .ui-resizable-e,
    .flora.ui-dialog .ui-resizable-e { cursor: e-resize; width: 7px; right: 0px; top: 0px; height: 100%; backgroun

    JavaScript javascript css wpf design windows-admin

  • RegEx to allow Phone Numbers with #-###-###-#### or ###-###-#### format only
    V Vipul Mehta

    Thanks Dinesh!! This works well

    Regards, Vipul Mehta

    ASP.NET regex question

  • RegEx to allow Phone Numbers with #-###-###-#### or ###-###-#### format only
    V Vipul Mehta

    Hi, I wanted a RegEx to allow user to enter phone number in #-###-###-#### or ###-###-#### format only. (Eg: 1-888-456-5678 or 888-456-5678) I have implemented RegEx[1] to allow user to enter Phone Number in #-###-###-#### format. What changes do we need to make to the existing RegEx so that it allows user to enter Phone Number in the above 2 formats only? Thanks in advance. [1] @"^\d{1}-\d{3}-\d{3}-\d{4}$" Regards, Vipul Mehta

    Regards, Vipul Mehta

    ASP.NET regex question

  • rights based database driven menu
    V Vipul Mehta

    Hi, You could also consider Authorization Manager (AzMan) as one of the option.. Find below link for the same for your ready reference. http://msdn.microsoft.com/en-us/library/ms998336.aspx[^]

    Regards, Vipul Mehta

    modified on Sunday, February 7, 2010 11:42 PM

    ASP.NET csharp asp-net database tutorial

  • Need to build a ASP.NET web page to check the health of a web application
    V Vipul Mehta

    Hi Neha, Go through the below link that has the video to implement Health Monitoring in ASP.NET application http://www.asp.net/(S(ywiyuluxr3qb2dfva1z5lgeg))/learn/videos/video-195.aspx[^] You could also look out for the log4net component.

    Regards, Vipul Mehta

    ASP.NET csharp asp-net database wcf help

  • Sorting gridview (using IList instead of Dataset)
    V Vipul Mehta

    Hi, I guess the below link might be helpful in your scenario.. http://geekswithblogs.net/paulwhitblog/archive/2006/05/08/77581.aspx[^]

    Regards, Vipul Mehta

    ASP.NET algorithms question

  • Using LINQ to query MULTI LEVEL object hierarchy [modified]
    V Vipul Mehta

    Hi, I have an MULTI LEVEL hierarchical collection object - List<MyApplication> apps = new List<MyApplication>(); The MyApplication object contains following properties - int ApplicationId, List<MyApplication> MyApplications, string AppName and so on.. When my application starts, the apps "multi level" collection object gets filled up. Now on a particular action on an page, I need to get/search for an Application object that has ApplicationId = 308 (in real time this number would come dynamically). This is easily possible by looping through the collection object and comparing the ApplicationId property with variable holding value 308. But I wanted to know if this is possible using LINQ query to get an "MyApplication" object with ApplicationId as 308? I tried searching on this issue but came across examples with fixed hierarchy level. Your suggestion/pointers to this issue would be highly appreciated Note: 1. The level of the object hierarchy is not fixed and can vary. 2. ApplicationId would be UNIQUE for all MyApplication object(s) in the hierarchy.

    Regards, Vipul Mehta

    modified on Sunday, November 1, 2009 10:49 PM

    LINQ csharp database linq algorithms help

  • Understanding using statement
    V Vipul Mehta

    Hi, I just wanted some clarification for using statement. With reference to my below code, lets say for some reason there is any exception on the following line of code - command.Parameters.Add("@ID", SqlDbType.Int) So in case of exception, the lines of code after the above line of code will not get executed and the control will move on to the last line of the method. Considering this scenario, I wanted to know will the connection and command objects (which are already initialised) get disposed?

    using (DbConnection connection =
    this.Database.ConnectionManager.GetConnection())
    {
    using (DbCommand command = connection.CreateCommand())
    {
    command.CommandType = CommandType.StoredProcedure;
    command.CommandText = "spGetList";

            command.Parameters.Add("@ID", SqlDbType.Int)
            command.Parameters("@ID").Value = this.ID
            
            using(DbDataReader dataReader = 
                    this.Database.Execute<DbDataReader>(command,
                    DatabaseExecutionType.DataReader))
            {
                this.Fill(dataReader);
            }
        }
    }
    

    Regards, Vipul Mehta

    .NET (Core and Framework) database question

  • Consume huge excel sheets by WCF Services
    V Vipul Mehta

    Hi, I need to write a WCF service to consume a large excel sheet (having in excess of 70,000 records). Bascially the client (a WPF Desktop application) needs to read the excel spreadsheet in a Data Set and perform validation against a schema. Once validated the client needs to send the data to the WCF service. The service then needs to insert the data in the database (simple inserts - one excel row becomes a row in the database table). What options (transport type and bindings) do I have for consuming the "huge" excel files EFFICIENTLY within the WCF Service?

    Regards, Vipul Mehta

    WPF csharp database wpf wcf xml

  • Using a common Master page across various applications hosted in IIS
    V Vipul Mehta

    Hi, I have created an Master Page that resides within my root folder. I wanted to resuse this Master Page across various applications hosted in IIS. But in doing so I get the below [1] error. I googled and found following link http://weblogs.asp.net/dwahlin/archive/2005/11/16/430779.aspx To be more specific here is what I wanted to achieve I have a master page @ following location C:\Inetpub\wwwroot\Common\TemplateMaster.master I wanted to use this master page across various applications i.e. I wanted this master page to be used by various .aspx pages of my below applications C:\Inetpub\wwwroot\SampleApp1\Page1.aspx C:\Inetpub\wwwroot\SampleApp2\Page1.aspx Following is the code for Master Page implementation within the C:\Inetpub\wwwroot\SampleApp1\Page1.aspx web page

    <%@ Page Language="C#" MasterPageFile="/intranet/Common/TemplateMaster.master" CodeFile="Page1.aspx.cs" Inherits="Page1" Title="Page 1" %>

    Now after the above implementation, when I try to build my SampleApp1 website, I encounter below [1] error Is it possible to achieve this? If yes, then is there is any better way to achieve the above functionalities other than that shown in the above link? **[1]**The virtual path '/intranet/Common/TemplateMaster.master' maps to another application, which is not allowed.

    Regards, Vipul Mehta

    modified on Wednesday, May 27, 2009 11:03 PM

    ASP.NET csharp asp-net windows-admin help question

  • Create Custom Event Source by turing UAC ON in Windows VISTA
    V Vipul Mehta

    Hi, We have a WPF Windows Application and this application would be used by all our client having VISTA OS. For any error occured, system will create an entry in Application event log using the custom event source - "Application Manager". When the User Access Control (UAC) is turned ON, VISTA does not allow to register custom event source in the registry. But this works well when the UAC is turned OFF. Is there any way where in we can create a custom event source (on the fly/programatically) with UAC turned ON? Note: Our application gets installed using "Click Once".

    Regards, Vipul Mehta

    .NET (Core and Framework) csharp wpf windows-admin help question

  • Resolving the full type name
    V Vipul Mehta

    I got this resolved. Within the project properties of my exe project the Assembly name was set as Test. So within the UIExceptionHandler class, I had to change the namespace from namespace CName.DName.AName.UI to namespace Test and this resolved the issue

    Regards, Vipul Mehta

    .NET (Core and Framework)

  • Resolving the full type name
    V Vipul Mehta

    Hi, We are writing an WPF application using .NET 3.5 with Enterprise Library 4.1. We have created an custom handler - UIExceptionHandler within our exe project. When we try to invoke the ExceptionPolicy.HandleException(e, "UI Message Policy"); method, we encounter the below [1] error.

    Find below my code for

    namespace CName.DName.AName.UI
    {
    [ConfigurationElementType(typeof(CustomHandlerData))]
    public class UIExceptionHandler : IExceptionHandler
    {
    public UIExceptionHandler(NameValueCollection ignore)
    {
    }

    public Exception HandleException(Exception exception, Guid handlingInstanceId) {
    DialogResult result = this.ShowThreadExceptionDialog(exception);
    return exception;
    }

    // Creates the error message and displays it.
    private DialogResult ShowThreadExceptionDialog(Exception ex)
    {return MessageBox.Show("Some Error Message", "Application Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
    }
    }
    }

    Also find below the implementation of the custom handler in the app.config file

    <

    add name="UIExceptionPolicy">
    <exceptionTypes>
    <add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" postHandlingAction="NotifyRethrow" name="Exception">
    <exceptionHandlers>
    <add logCategory="General" eventId="100" severity="Error" title="Enterprise Library Exception Handling" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" priority="0" useDefaultLogger="false" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Logging Handler" />
    <add type="CName.DName.AName.UI.UIExceptionHandler, CName.DName.AName.UI" name="UI Message Handler"/>
    </exceptionHandlers>
    </add>
    </exceptionTypes>
    </add>

    FYI - When I tried implementing the UIExceptionHandler custom handler class in an DLL and provided the full name in the app.config, it worked fine. But this fails when I create the handler within the exe project. The name of our exe project is Test. What might be wrong here? [1] The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyImpl, UIExceptionPolicy]) fail

    .NET (Core and Framework)
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups