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
M

MaheshSharma

@MaheshSharma
About
Posts
41
Topics
25
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • xaml
    M MaheshSharma

    <Window x:Class="SearchApp.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit" Title="Window1" Height="500" Width="500"> <Grid> <Label Content="Directory : " HorizontalAlignment="Stretch" Margin="12,12,356,400" VerticalAlignment="Center" Background="Beige" FontSize="20" Loaded="Label_Loaded"/> <Label Background="Beige" Content="Search Prase :" FontSize="20" HorizontalAlignment="Stretch" Margin="12,67,324,345" VerticalAlignment="Center" /> <Label Background="Beige" Content="Recursive Flag :" FontSize="20" HorizontalAlignment="Stretch" Margin="12,122,311,290" VerticalAlignment="Center" /> <TextBox Height="23" Text="{Binding Path=DirName, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True}" HorizontalAlignment="Left" Margin="151,29,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" /> <TextBox Height="23" Text="{Binding Path=SearchCriteria, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True}" HorizontalAlignment="Left" Margin="171,84,0,0" Name="textBox2" VerticalAlignment="Top" Width="120" /> <TextBox Height="23" HorizontalAlignment="Left" Margin="181,139,0,0" Name="textBox3" VerticalAlignment="Top" Width="120" /> <Grid Height="187" HorizontalAlignment="Left" Margin="30,0,0,54" Name="grid1" VerticalAlignment="Bottom" Width="416"> <DataGrid DockPanel.Dock="Top" AutoGenerateColumns="True" Name="DGComm" CanUserResizeColumns="True" IsReadOnly="True" ItemsSource="{Binding Source=dataGridRows}" Margin="-10,6,-15,-46"> <DataGrid.Columns> <DataGridTextColumn Header="File Name" Binding="{Binding FileName}" Width="0.1*" /> </DataGrid.Columns> </DataGrid> </Grid> </Grid;> </Window;>

    Java wpf csharp css wcf com

  • xaml
    M MaheshSharma
    Java wpf

  • xaml
    M MaheshSharma
    Java wpf

  • xaml
    M MaheshSharma
    Java wpf

  • xaml
    M MaheshSharma
    Java wpf

  • parse xml
    M MaheshSharma

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using System.Xml; using System.IO; using System.Xml.Linq; namespace SearchApp { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public string _dir; public string _searchCriteria; /// <summary> /// validatate directory /// </summary> public string DirName { get { return _dir; } set { _dir = value; if (String.IsNullOrEmpty(value)) { throw new Exception("Directory is mandatory."); } } } /// <summary> /// validate search criteria /// </summary> public string SearchCriteria { get { return _searchCriteria; } set { _searchCriteria = value; if (String.IsNullOrEmpty(value)) { throw new Exception("Search Criteria is mandatory."); } } } private List<object> dataGridRows = new List<object>(); public MainWindow() { InitializeComponent(); DataContext = this; } private void Label_Loaded(object sender, RoutedEventArgs e) { } /// <summary> /// another way by which we can parse xml recursively /// </summary> /// <param name="element"></param> /// <param name="depth"></param> void ProcessXml(XElement element, int depth) { if (!element.HasElements) { } else { depth++; foreach (XElement child in element.Elements()) { ProcessXml(child, depth); } depth--; } } /// <summary>

    Java csharp wpf linq xml

  • parse xml
    M MaheshSharma

    how to parse xml recusive based on directory and search criteria to get file name

    <FileSystem>
    <Drives>
    <Drive name="C:">
    <Folder name="data">
    <Folder name="CSLogs">
    <Folder name="Applications">
    <Folder name="Citrix">
    <Folder name="XenDesktop Installer">
    <Folder name="MSI Log Files">
    <File Name="BrokerAgent_x64311392187.txt" />
    <File Name="CitrixCse_x641365171634.txt" />
    <File Name="DirectorVDAplugin_x64276896625.txt" />
    <File Name="IcaWS_x64397216209.txt" />
    <File Name="MachineIdentityServiceAgent_x64492650649.txt" />
    <File Name="MachineManagementProvider_x64407826716.txt" />
    <File Name="personalvDisk_x64359317401.txt" />
    <File Name="profilemgt_x641717284940.txt" />
    <File Name="PzAppV_VDA_x641126819295.txt" />
    <File Name="UpsClient_x641677360187.txt" />
    <File Name="VdaMonitorPlugin_x64958367608.txt" />
    <File Name="WMIProxy_x64801526517.txt" />
    </Folder>
    <File Name="XenDesktop Installation.log" />
    </Folder>
    <File Name="23157CIXXenDesktopVirtFx_Popup.log" />
    <File Name="FixPolicyCorruption.ps1.log" />
    </Folder>

    C# xml tutorial

  • parse xml recursive
    M MaheshSharma

    how to parse xml recursive and search file name based on directory and search criteria

    <FileSystem>
    <Drives>
    <Drive name="C:">
    <Folder name="data">
    <Folder name="CSLogs">
    <Folder name="Applications">
    <Folder name="Citrix">
    <Folder name="XenDesktop Installer">
    <Folder name="MSI Log Files">
    <File Name="BrokerAgent_x64311392187.txt" />
    <File Name="CitrixCse_x641365171634.txt" />
    <File Name="DirectorVDAplugin_x64276896625.txt" />
    <File Name="IcaWS_x64397216209.txt" />
    <File Name="MachineIdentityServiceAgent_x64492650649.txt" />
    <File Name="MachineManagementProvider_x64407826716.txt" />
    <File Name="personalvDisk_x64359317401.txt" />
    <File Name="profilemgt_x641717284940.txt" />
    <File Name="PzAppV_VDA_x641126819295.txt" />
    <File Name="UpsClient_x641677360187.txt" />
    <File Name="VdaMonitorPlugin_x64958367608.txt" />
    <File Name="WMIProxy_x64801526517.txt" />
    </Folder>
    <File Name="XenDesktop Installation.log" />
    </Folder>
    <File Name="23157CIXXenDesktopVirtFx_Popup.log" />
    <File Name="FixPolicyCorruption.ps1.log" />
    </Folder>
    <Folder name="CTXReceiverInstallLogs">
    <File Name="CtxInstall-AuthManager-20151202-051652.log" />
    <File Name="CtxInstall-CitrixHDXMediaStreamForFlash-ClientInstall-20151202-051652.log" />
    <File Name="CtxInstall-CitrixReceiverUpdater-User-20151202-051652.log" />
    <File Name="CtxInstall-DesktopViewer-20151202-051652.log" />
    <File Name="CtxInstall-GenericUSB-20151202-051652.log" />
    <File Name="CtxInstall-ICAWebWrapper-20151202-051652.log" />
    <File Name="CtxInstall-RIInstaller-20151202-051651.log" />
    <File Name="CtxInstall-SelfServicePlugin-20151202-051652.log" />
    <File Name="CtxInstall-SSONWrapper-20151202-051652.log" />
    <File Name="CtxInstall-Vd3dClient-20151202-051652.log" />
    <File Name="Tro

    C# xml tutorial

  • Ashwin
    M MaheshSharma

    First clearing that Java is two things Java language and Java Platform. Similarly .Net is two things the .Net supported languages and .Net Platform. Now come to major difference which is root cause of differences between Java and .Net The ideal of Java has always been a Single language shared by multiple Platforms. Whereas .Net is based on Multiple languages shared by single Platform. Now come to derived differences from this major difference. 1).Net has Multilanguage support. While java has based on java language only. According to Microsoft latest news .Net support around 40 languages including major market share COBOL Vb.net C#.net Perl and many others. 2)Since java is multiplatform so it’s set of Framework Classes is limited to what is available on all platforms. While .Net has set of all the Classes available on Microsoft Platform. 3)According to Sun Java is renowned as “Write once run anywhere”. While .net has no such scene. But my perception is its not completely true to say “Write once run anywhere” but one aspect is that most of the applications written today focus on one platform only. Similarly to assure its multiple support much time needed to debug it on all platforms. So I would like to say Sun that it’s not “Write once run anywhere” but its “Write once and Debug everywhere. 4).Net due to disconnected data access through ADO.Net has hi level of performance against Java JDBC which requires multiple round trips to data base. 5)Java has support to open source platform while .Net has no direct support for Open source Platforms. Java is a programming language designed to be run on many different platforms, and so uses a common language which has to be compiled and run on different platforms (eg. windows, mac and linux). Microsoft, with their offering of .NET, takes on a different approach, by allowing you to program in any language you choose, but has compilers for many different languages that generates a platform specific code (i.e. Microsoft or Windows). Therefore, Java can be used to write programs for many different operating systems, and .NET can be used to make any programming language into a Windows program. This is all based on the original design goals of the programming language, and has both advantages and disadvantages over each other. For example, .NET would be good for integrating legacy code from different languages into a working program, when you don't want to re-write each piece of code into the same programming language. Both .NET and Java are otherwise object-ori

    C# csharp java perl design

  • MahTab
    M MaheshSharma

    <%@ Page Language="C#" MasterPageFile="~/SLS.Master" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="QuickStart.aspx.cs" Inherits="SLS.QuickStart" Title="SLS - Quickstart" %> <%@ Register Src="Controls/UserReports.ascx" TagName="UserReports" TagPrefix="uc1" %> <%@ Register Src="Controls/AdvancedSearch.ascx" TagName="AdvancedSearch" TagPrefix="uc1" %> <%@ Register Src="Controls/Submit.ascx" TagName="Submit" TagPrefix="uc1" %> <%@ Register Src="Controls/MySLS.ascx" TagName="MySLS" TagPrefix="uc1" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxToolkit" %> <%@ Register Src="Controls/Search.ascx" TagName="Search" TagPrefix="uc1" %> <%@ Import Namespace="SLS.DAL" %> <%@ Import Namespace="System.Configuration" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <div class="HelpLink" style="padding-left:750px;padding-top:4px;"><a target="_blank" href="Help/SLS_HELP.htm">Help Me!</a></div> <script> var searchPage="VivisimoSearch.aspx"; //When the active tab changes function ActiveTabChanged(sender, e) { var text="SLS - " +sender.get_activeTab().get_headerText(); window.parent.document.title=text; document.getElementById('<%=AdvancedSearch1.ClientID%>_hidtxtFind').value = "0"; if(sender.get_activeTab().get_tabIndex()!=5){ var tabBehavior=document.getElementById('<%=TabContainer1.ClientID%>').control; tabBehavior.removeCssClass("CustomTabStyle1"); tabBehavior.addCssClass("CustomTabStyle"); tabBehavior._tabs[5]._hide(true); } //SLS-116 :- Google analytics GoogleTrackPage(sender.get_activeTab().get_headerText()); } //Google Analytics to grab the page function GoogleTrackPage(tab){ //when we are on the 5th tab in that case (tab = "") //So we are not recording the url here //in the 5th tab ViewReport.aspx gets loaded //so we are placing the google anatylitcs user control there to track the url if(tab != ""){ var appName = '<%= Util.GetConfigValue("ApplicationName") %>'; var gaTrackingId = '<%= Util.GetConfigValue("GATrackingCode") %>'; var pageTracker = _gat._getTracker(gaTrackingId);

    ASP.NET csharp sysadmin tools help workspace

  • Progress Bar
    M MaheshSharma

    function onUpdating() { // get the update progress div var pnlPopup = $get('<%= this.pnlPopup.ClientID %>'); // make it visible pnlPopup.style.display = ''; // center of gridview var x = (window.screen.width/2) - (75 + 10); var y = (window.screen.height/2)- (100 + 50); // set the progress element to this position Sys.UI.DomElement.setLocation(pnlPopup, x, y); } function onUpdated() { // get the update progress div var pnlPopup = $get('<%= this.pnlPopup.ClientID %>'); // make it invisible pnlPopup.style.display = 'none'; //when we page we have to call this to make the page scroll } <AjaxToolkit:UpdatePanelAnimationExtender ID="UpdatePanelAnimationExtender1" runat="server" TargetControlID="updatePanel1" BehaviorID="UpdatePanelAnimationExtender1" Enabled="True"> <Animations> <OnUpdating> <Parallel duration="0"> <%-- place the update progress div over the gridview control --%> <ScriptAction Script="onUpdating();" /> </Parallel> </OnUpdating> <OnUpdated> <Parallel duration="0"> <%--find the update progress div and place it over the gridview control--%> <ScriptAction Script="onUpdated();" /> </Parallel> </OnUpdated> </Animations> </AjaxToolkit:UpdatePanelAnimationExtender> <asp:Panel ID="pnlPopup" runat="server" CssClass="progress" Style="display: none;" meta:resourcekey="pnlPopupResource1"> <div class="container"> <div class="header"> Loading, please wait...</div> <div class="body"> <img src="../Images/activity.gif" alt="" /> </div> </div> </asp:Panel>

    ASP.NET design sysadmin docker tools announcement

  • Syncfusion Help
    M MaheshSharma

    // Hide rows grid.Model.RowHeights.SetHidden(2, 100, true); grid.Model.RowHeights.SetHidden(110, 1000, true); // Unhide rows grid.Model.RowHeights.SetHidden(1010, 10000, false); //Hide columns grid.Model.ColumnWidths.SetHidden(2, 100, true); grid.Model.ColumnWidths.SetHidden(110, 150, true); // Unhide columns grid.Model.ColumnWidths.SetHidden(1010, 10000, false); [C#] //Insert a column at position 2. grid.Model.InsertColumns(2, 1); //Insert 2 rows at position 5. grid.Model.InsertRows(5, 2); [C#] grid.Model.Options.ExcelLikeCurrentCell = true; [C#] grid.Model.Options.ExcelLikeSelectionFrame = true; http://help.syncfusion.com/ug\_74/GridWPF/defaultWPF.html http://www.syncfusion.com/support/kb/2153/Opening-Syncfusion-offline-documentation-from-the-Dashboard-in-the-version-81030 http://help.syncfusion.com/ug\_74/gridweb/CreatingTemplates.html

    ASP.NET csharp html css com help

  • Help required
    M MaheshSharma

    <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/> </configSections> <log4net> <appender name="debugFile" type = "log4net.Appender.RollingFileAppender"> <file value="AshwinTop10Refresh.log"/> <appendToFile value="true" /> <datePattern value =".yyyyMMdd"/> <rollingStyle value="Date"/> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%d{yyyyMMdd HH:mm:ss} - %m %n" /> </layout> </appender> <root> <level value="ALL"/> <appender-ref ref="debugFile" /> </root> </log4net> <appSettings> <add key="DBPassword" value="UzWn5bFMdfEnB7cYpjmV/Q=="/> <add key="ContentMonitorDBPassword" value="0EeMxiu8vPeqbpB+0hR8Rg=="/> </appSettings> <connectionStrings> <!-- SQL connection string --> <add name="ConnString" connectionString="server=QWASR03;database=Ashwin20;App=Ashwin20;User=Ashwin_admin;password=" providerName="System.Data.SqlClient"/> <!-- Content Monitor connection string --> <add name="ContentMonitorConnString" connectionString="Data Source=QWASR03;Integrated Security=no;User Id=weeruser;Password=" providerName="System.Data.OracleClient"/> </connectionStrings> </configuration> Not saving in log. Please help.

    ASP.NET database sysadmin security xml help

  • Exception thrown
    M MaheshSharma

    using System; using System.Configuration; using System.Web.UI.WebControls; using System.Security.Principal; using System.Xml; using Itools.Encryption; using System.Web; using System.Text; using System.Text.RegularExpressions; namespace Ashwin.DAL { /// <summary> /// Summary description for Util /// </summary> public class Util { //Design users //adriaanse.a //allinsmith.w private static readonly string whoami = "ashwin.k";//For testing - for cop ["westring.bd"] private const string encKey = "KFn2oZAwJHWFRbSXoaSlYjl5TADpyyt53rowhbVwH/M="; private const string encVector = "nb2dZEGWnzg8R1GZAuUkUQ=="; private static System.Collections.ICollection appSettings = ConfigurationManager.AppSettings; private static System.Configuration.ConnectionStringSettingsCollection connStrings = ConfigurationManager.ConnectionStrings; /// <summary> /// Returns the username without the domain of the current logged in user. /// </summary> /// <param name="User">Current logged in user, example CN\ashwin.k</param> /// <returns>Returns the username without the domain of the current logged in user. </returns> public static string GetSimpleUsername(IPrincipal User) { //setup user array to split username into domain and username #if DEBUG return whoami; #endif string[] user; // define which character is seperating fields char[] splitter = { '\\' }; //perform split user = User.Identity.Name.Split(splitter); //check to see if no domain exists for user if (user.Length < 2) { return user[0]; } else { return user[1]; } } /// <summary> /// Method to make sure that user's inputs are not malicious /// </summary> /// <param name="text">User's Input</param> /// <param name="maxLength">Maximum length of input</param> /// <returns>The cleaned up version of the input</returns> public static string InputText(string text, int maxLength) { text = text.Trim(); if (string.IsNullOrEmpty(text)) return string.Empty; if (text.Length > maxLength) text = text.Substring(0, maxLeng

    ASP.NET design security workspace data-structures testing

  • Problem
    M MaheshSharma

    namespace Ashwin { public class Global : System.Web.HttpApplication, ICacheManager { protected void Application_Start(object sender, EventArgs e) { //Load the cache for the first time. ReloadCache("All"); } protected void Application_End(object sender, EventArgs e) { //Cleanup anything that we left if we left anything using the SubmitReport.asmx /*string tempPath = Server.MapPath("TempData"); if (System.IO.Directory.Exists(tempPath)) System.IO.Directory.Delete(tempPath, true);*/ } /// <summary> /// When the session starts. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Session_Start(object sender, EventArgs e) { UserSession session = new UserSession(Request); try { LoggedInUserInfo liui = session.Login(); // if user successfully logged in // then store in Session cache if(liui != null) { CacheManager.SetCache("loggedInUser", CacheManager.cacheTypeEnum.Session, liui, this); // get the top 10 Read reports in last 30 days i.e. one month Report report = new Report(); IList list = report.GetTopReadReport(10, DateRangeEnum.OneMonth, ReportClassificationEnum.All, liui.User.UserId); CacheManager.SetCache("TopReadReport", CacheManager.cacheTypeEnum.Session, list, this); FillCache("SavedSearches"); } } catch(Exception exc) { Exception LastException = exc; Session["LastException"] = LastException; ErrorDetail ed = new ErrorDetail(); RecordError recordError = new RecordError(); recordError.Credentials = new System.Net.NetworkCredential(Util.GetConfigValue("WebServicesLogin"), Util.GetConfigValue("WebServicesPwd")); recordError.PreAuthenticate = true; ed.applicationName = "Ashwin20"; ed.browserVersion = Request.ServerVariables["HTTP_USER_AGENT"]; ed.errorUrl = Request.Url.ToString(); ed.note = LastException.Message; ed.stackTrace = LastException.StackTrace; ed.userNa

    ASP.NET csharp sysadmin help

  • Detect Browser Close
    M MaheshSharma

    Yes I tried it. I tried this one also if (window.event.clientX < 0 || window.event.clientY < 0) This is working for IE in some machine and not for others. And I place a html button runat="server" whose display style is none after check this if (window.event.clientX < 0 || window.event.clientY < 0) i fired the button click from javascript and call a procedure in code behind, like that window.document.hidBut.click(); Pls let me know if there is another way to handle the close button of browser. regards mahesh

    ASP.NET csharp javascript

  • Detect Browser Close
    M MaheshSharma

    Michael, Thanks for reply. Well i write a function in javascript and call that function like that from inside the body tag onunload ="CloseBrow();" inside the CloseBrow how i detect when user click on Close button of browser, i must have to check that since page is unloaded every time when user move back and forth. I user some script inside that function "if (screenTop > 9999)" but this is working in some browser and not working in another browser. thanks and regards mahesh

    ASP.NET csharp javascript

  • maintain values of a textbox on Postback
    M MaheshSharma

    Set the autopostback = false in aspx page check it

    ASP.NET help

  • maintain values of a textbox on Postback
    M MaheshSharma

    I thing you have you set the autopostback property of textbox set to false cheers

    ASP.NET help

  • Detect Browser Close
    M MaheshSharma

    I want to clear a session by calling an assembly, How i deduct browser close button in javascript or vb.net. When the user click on the close button of browser i want to call a method in code behind. Thanks Mahesh

    ASP.NET csharp javascript
  • Login

  • Don't have an account? Register

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