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
C

classy_dog

@classy_dog
About
Posts
176
Topics
117
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • using javascript in a Firefox browser
    C classy_dog

    I am supporting a web form .net application and I have found out that some of the JavaScript has been deprecated using Internet explorer by using the Internet explorer web developer tools. I have now used the Firefox browser and the application seems to work for what I have tested so far.

    Before I place the new version of the application into production, I would like to know what JavaScript features are currently obsolete and/or may be deprecated in the near future.

    Due to that fact, would you tell me and/or point me to urls (links) that will tell me what JavaScript items are obsolete and/or deprecated using the Firefox browser?

    Web Development csharp javascript tools question announcement

  • javascript message on web app
    C classy_dog

    In a vb.net 2010 web form application, I have the following code:

    <%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="default.aspx.vb" Inherits="attendanceletters_default" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <script src="../scripts/jquery-1.3.2.js" type="text/javascript"></script>
    <script src="../scripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
    <%If (False) Then%>
    <script src="../scripts/jquery-1.3.2.js" type="text/javascript"></script>
    <% End If%>
    <script src="../scripts/site.js" type="text/javascript"></script>
    <script src="../scripts/json2.js" type="text/javascript"></script>
    function GetStudentLetterTemplate(schoolyear, schoolnum, milestone, studentlink, language, semester) {

            alert('schoolyear: ' + schoolyear + 'schoolnum: ' + schoolnum + 'milestone: ' + milestone + 'studentlink: ' + studentlink + 'language: ' + language + 'semester: ' + semester);
             if (milestone == '999') {
                 alert('You have selected student(s) having more than one CAIP entry for the current school year');
               return;
            }
    

    }

    I want to display a javascript alert message in production when an error condition exists. The code listed above works in a development envirnonment, but the code would not deploy to a test app server. Thus can you show me what I can do to fix the code listed above? If not, would you show me what I can do in a production environment to have a warning message displayed to a user with the least amount of extra code? I do not care how the warning message is displayed, I just want a warning message to be displayed.

    JavaScript javascript help csharp design

  • error message on master page
    C classy_dog

    In a vb.net 2010 web form application, I have the start of code for a master page listed below:

    #Region "Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load"
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load

        \_master = CType(Page.Master, MasterPage) 
        \_master.PageTitle = "Attendance" 
    

    In the master page, there is an area to display error messages. When I have decided to place an
    error message in the master page, I have made a call to a (static) shared function from an ajax call
    to obtain data from the sql server database. The ajax call is made from a javascript function.

    Thus can you tell me if there is away that I can access the error section of the of the master page?
    Basically I need to have the master page with scope to access.
    Thus can you tell me if this is possbile and/or show me the code on how to solve my problem?

    ASP.NET database help csharp javascript

  • ajax call to shared (static) mehtod
    C classy_dog

    I am having a problem with an ajax call to a shared (static) vb.net function to obtain data from the database.
    In a vb.net 2010 web form application, I needed to make a call from a javascript function to a shared (static) function to
    obtain data from a sql server 2012 database. The first ajax call below is the original call and the second call is the one
    I came up by copying the first call.
    The problem is the first call always occurs before the second ajax call regardless of what I do with the code. There are cases when I
    only want the second call to occur. By stepping through the code, I see that there is alot of jquery code that occurs.
    $.ajax({
    type: "POST",
    contentType: "application/json; charset=utf-8",
    url: document.location.pathname + "/GetStudentLetter",
    data: "{ " + strData + " }",
    dataType: "json",
    success: function (data) {
    LoadEditor(JSON.parse(data.d), milestone);
    },
    error: AjaxFailed
    });
    if (milestone == '999') {
    $.ajax({
    type: "POST",
    contentType: "application/json; charset=utf-8",
    url: document.location.pathname + "/Gettattschyr",
    data: "{ " + strData + " }",
    dataType: "json",
    success: function (data) {
    successtest(eval(data));
    },
    error: AjaxFailed
    });
    }
    }
    function successtest(sletter) {
    var sle = sletter
    _txtattschyr = sletter.d
    if (_txtattschyr > '1') {
    alert('You have selected student(s) having more than one Entry for the current school year. ');
    return
    }
    }

    Thus would you tell me what you think is wrong and/or tell me how I can change the second ajax call to try to solve this issue?

    ASP.NET help javascript database csharp

  • javacript alert message
    C classy_dog

    In a vb.net 2010 webform application, I am going to display a popup javascript alert message for the user when there are 2 records in the database for the current school year for each unique student. This popup message is displayed since the user needs to update the database using vendor software.

    For the javacript alert message, I have the following questions:

    1. At the top the alert message, it says 'Message from Web Page' since that is probably the default value. Is there a way that I can change this message to something I want? If so, how can I change the message?

    2. I am wondering what if there maximum length that I can display in the error message? If so, what is the maximum length?

    3. Can I extend the maximum size of the message and if so, can you show me how to extend the size of the error message?

    4. Can I change the display icon to be an error instead of a warning? If so, how would I accomplish this goal?

    JavaScript question csharp javascript database

  • C# desktop app being shared
    C classy_dog

    In an existing C# desktop 2010 application, I need to have two or more users share the same computer. The users will run the same desktop application but have access to different files and folders on the network share. Each person will have their own unqiue config file to show what files they have access to. Each person has their own Access 2013 database files. That is one of the files the users have access to. Based upon what I have said, I have the following questions to ask: 1. Will I need separate installs of the application on the same computer? Part of the install process includes placing the app.config file in the correct location. If so, can you tell me what I need to do for the separate installs? 2. If I do not need separate installs, what should I do about the separate app.config files? Each person's config file will point to files they directly have access to. I do not want each person to access the other person's config file.

    C# csharp database sysadmin question

  • vb.net 2010 obtain values from app.config file
    C classy_dog

    In a vb.net 2010 desktop application that uses the .net framework 3.5, I would like the application to return app.config file values back to the area that is obtaining the values from the config file.

    When I look at the code in the following section url: https://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.appsettings(v=vs.100).aspx , it does not really tell me how to obtain values from the app.config file and return the values to the area that called the app.config file. Basically I need to obtain a large volume of directory path values from the app.config file.

    Thus would you show me the code on how to accomplish this goal?

    Visual Basic csharp dotnet visual-studio com

  • vb.net access value in combo box
    C classy_dog

    In a VB.net 2010 desktop application, I just added 2 combo boxes to the desktop. The first combo box lists the name of the various users. The first combo box that lists the names of various users has the following values added to the collection: 'ANN','KARON'. The second combo box lists the names of Access 2013 database files that the user has access to. I have the following code:

    cboUser.SelectedIndex = 0
    Dim dirAccessFiles As String() = Directory.GetFiles("H:\FilesTest", "*.accdb")
    Dim list As New List(Of String)()
    For Each dir As String In dirAccessFiles
    If String.Equals(Path.GetFileNameWithoutExtension(dir).Substring(0, 3), cboUser.SelectedValue) Then
    list.Add(Path.GetFileNameWithoutExtension(dir))
    End If
    Next

        list.Sort()
         For i As Integer = list.Count - 1 To 0 Step -1
             cboAccessFile.Items.Add(list(i))
         Next
    

    In the following line of code, "If String.Equals(Path.GetFileNameWithoutExtension(dir).Substring(0, 3), cboUser.SelectedValue)" , The cboUser.SelectedValue has nothing in it. However I know the collection has something in it since I can see the values in the collection of the combo box. Thus can you tell me how to change the code so that the value of 'ANN' can be located in the if statement I just listed above?

    Visual Basic csharp database tutorial question

  • vb.net combo box
    C classy_dog

    Thanks for your helpful answers!

    Visual Basic csharp tutorial question

  • vb.net combo box
    C classy_dog

    Would you show me how to write the code you suggested here," Instead, add a listbox, set its Visible property to false, and Sort = True. Then load the items into that and let tt take of sorting them. Then, to get reverse order, just read the items in reverse and load them into your combo box."? Could you give me at least a start on how to set this up?

    Visual Basic csharp tutorial question

  • vb.net 2010 default value for shared variable
    C classy_dog

    In a VB.net 2010 desktop application, reports obtain their values to execute by users selecting values from the various vb.net controls. In 2 columns where there are date pickers, the default value of the date pickers is to use today's date. The application passes values from the controls using the following code:

    Private Sub dtEnddate_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtEnddate.ValueChanged

    Variables.g_strEndDate = dtEnddate.Text

    End Sub

    Private Sub dtEnddate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtEnddate.Click

    Variables.g_strEndDate = dtEnddate.Text

    End Sub

    The problem is if the user keeps todays date, and does not change the date, the variables.g_strEndDate never gets a value. These variables I am referring to are in a Public Class Variables and the variable is define as Public Shared g_strEndDate As String. Thus can you tell me the best way to give this column default values of today's date? What code would you use and where would you place the code?

    Visual Basic csharp help question

  • vb.net combo box
    C classy_dog

    In a VB.NET 2010 desktop application, I am using the following new logic to load values into a combo box.

    Public dirAccessFiles As String() = Directory.GetFiles("H:\FilesTest", "*.accdb")
    Try
    Dim dir As String

            For Each dir In dirAccessFiles
                cboAccessFile.Items.Add(Path.GetFileNameWithoutExtension(dir))
            Next
        Catch except As Exception
            Console.WriteLine("The process failed: {0}", e.ToString())
        End Try
    

    The user wants the file names to be in descending order in the combo box. Thus, can you tell me how to modify the code list above and/or would you show me code on how I can load file names into the combo box in descending order?

    Visual Basic csharp tutorial question

  • vb.net 2010 desktop app value displayed in combo box
    C classy_dog

    In a Visual basic.net 2010 desktop application, I am loading a list of Access 2013 files that the user needs to select to work with. The code listed below is correct but the file names are too long for the combo box. Here is the code:

    Try

    Dim dirAccessFiles As String() = Directory.GetFiles("H:\FilesTest", "*.accdb")

    Dim dir As String

    For Each dir In dirAccessFiles

    cboAccessFile.Items.Add(dir)

    Next

    Catch except As Exception

    Console.WriteLine("The process failed: {0}", e.ToString())

    End Try

    Thus I have the following questions to ask you: 1. If there is a way to expand the size of the combo box values while the application is executing, can you show me how to do that? 2. Right now in dropdownlist box, the values look like, 'H:\Testfiles\Diane__Currentyear.accdb'. I would like the value only of 'Diane__Currentyear' that is listed above to display. Also where hardcoded value of 'H:\Testfiles' is displayed in the code above, I will get the actual value from the app. config file. Thus would you show the code on how to display only the value of 'Diane__Currentyear' in the list of combo box values?

    Visual Basic csharp tutorial question

  • vb.net visibility o form objects
    C classy_dog

    In response to your answers, I have the following questions: "Set the menu item's visibility property to False so it will not show on the form. You then set it to True when required." I placed the following code in the application, and it did not work:

    MainMenu1.MdiListItem.Visible = False

    Thus can you show me the code to Set the menu item's visibility property to False? Also would you show me the code on how to 'You would need to delete them and re-insert them' the menuitems? The menu items are currently created in the gui and not in code.

    Visual Basic csharp question

  • vb.net visibility o form objects
    C classy_dog

    In a VB.NET 2008 desktop application, I need to add some initial selections with a corresponding button to the 'main' form, before any of the normal processing is allowed to occur. Thus due to that fact, I have the following questions to ask: 1. This application is using a System.Windows.Forms.MainMenu and I would like the 'File' option to not display until the 'new' button is clicked? If this is possible, would you showe me the code for this to occur? 2. If option #1 is not possible, is there a way to make System.Windows.Forms.MainMenu not display until the the 'new' button is clicked? If this is possible, would you show me the code for this to occur? 3. In this application there is code that adds menu items with logic like,

     MainMenu1.MenuItems(0).MenuItems.Add("New Item", New EventHandler(AddressOf ClickHandler))
      MainMenu1.MenuItems(0).MenuItems.Add("-") 
    

    Is there a way to modify the order of list of menuitems after the menu items have already been created? Would I need to delete the menuitems at that point and create the menuitems again? Thus would you show me the code for this option and/or let me know if this option is not possible?

    Visual Basic csharp question

  • C# deployment creating a porject folder
    C classy_dog

    For the installation of a C# desktop 2010 application, I am using the traditional setup and deployment template. As part of this template, I want to make certain that a folder is created in a directory path that looks like C:\log_files. Thus can you tell me how to have the setup and deployment project create the directory path for me, if the directory path does not exist?

    C# csharp sysadmin tutorial question workspace

  • C# select excel file from directory path
    C classy_dog

    In a C# 2010 desktop application, I want to change the application so that it will only allow users to select a report that meets the following criteria: 1. part of the file name is "ErrorReport" and 2. The last node of the file name is .xlsx or .xls. So far I have the following code:

    string[] excelFiles = Directory.GetFiles(strDirectoryLoc, "*ErrorReport*")
    .Select(path => Path.GetFileName(path))
    .Where(x => (x.EndsWith(".xlsx") || x.EndsWith(".xls"))
    && (!x.StartsWith("~")))
    .ToArray();

    This code works when I am selecting only excel (*.xls or *.xlsx) files. The problem occurs if the user selects a .pdf file iniitally and there is actually a file in the directory path that meets the criteria I listed above. The code will ignore the .pdf file the user selects and will actually use the excel file that is in the directory path. Thus how can I change the code listed above to say the .pdf file is invalid?

    C# question csharp help

  • C# obtain db values from app.config of program accessed by a dll
    C classy_dog

    I have a C# 2010 console/desktop application that obtains its own database connections from its app.config file. This application adds a reference to a dll so that it can access another C# console/windows application. The main C# 2010 console/desktop application needs to be able to access the database connections of the program that is called in the dll. The database connections of the called program are stored in an app.config file. Thus can you show me code or explain to me how the main C# 2010 console/desktop application can obtain the database connections stored in the app.config file for the program that is accessed by the dll?

    C# database csharp question

  • C# accessing a windows api
    C classy_dog

    I will get calling an windows api that another programmer at work is 'writing'? Should I ask her how to call the windows api?

    C# question csharp json tutorial

  • C# using WPF
    C classy_dog

    Thanks!

    C# csharp visual-studio wpf json help
  • Login

  • Don't have an account? Register

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