Search:

Type: Posts; User: Simon Canning

Page 1 of 13 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    0
    Views
    805

    VS 2013 EF6 foreign key name duplicate

    I am coding a MVC 5 internet application and I have a question in regards to a foreign key reference in a model of mine.

    I have a model with the following attributes:


    public int...
  2. How do I code use cascading deletes in an MVC 5 internet application

    Hi,

    I am needing to add cascading deletes to my MVC5 Internet Application.

    I have a MapCompany model that has a virtual List<MapLocation>. I am wanting to remove all associated MapLocations...
  3. VS 2013 Getting the ApplicationUser object in a controller

    I am writing a C# MVC5 internet application and am having some trouble getting the 'ApplicationUser' object in a controller that I have created.

    Here is my code:


    var userManager = new...
  4. 5.0 Re: Find an object in a list via a name attribute

    Good point... sorry, a spelling mistake.
  5. 5.0 Find an object in a list via a name attribute

    In C#, if I have a list of objects where each list has a list of list items, and each of these list items can be a list of objects (or just a single list item), what is the best way to retrieve a...
  6. Replies
    6
    Views
    1,307

    Re: Accessing a database in C#

    OK, thanks.
  7. Replies
    6
    Views
    1,307

    Re: Accessing a database in C#

    Is there some software that I can use to help construct ADO.NET SQL statements that retrieve the same data as if I was using the Entity Framework?

    For example:

    If I retrieve some attributes of...
  8. Replies
    6
    Views
    1,307

    Re: Accessing a database in C#

    I am using Xamarin and as such there is no support for Entity Framework.

    Xamarin does have support for ADO.NET. Is it possible to access an C# MVC4 internet application's database using ADO.NET? ...
  9. Replies
    6
    Views
    1,307

    [RESOLVED] Accessing a database in C#

    I am developing a C# MVC4 internet application and would like to get the data from this database and use this data in my Xamarin application. Xamarin uses C#, so I think this is a good place to ask...
  10. 4.0 Re: ArgumentNullException using a list

    I have figured out the answer.

    All I needed was a Public Initialize function for the list.

    Thank you for your time.
  11. 4.0 [RESOLVED] ArgumentNullException using a list

    I am developing an MVC 4 C# internet application.

    I have a MapLocationCompany class as well as a MapLocation class. I am after each MapLocationCompany object to have a list of MapLocation objects....
  12. Replies
    1
    Views
    1,020

    4.0 Convert an object for serialization

    I am coding in Xamarin and I need to pass an object to another activity, however I am getting an error in relation to converting the object to an 'Android.OS.Bundle'

    Here are the errors:




    ...
  13. VS 2013 Downloading an http file with no caching

    I am downloading an http file from an ftp server of mine. This file holds the version number for my application, and as such is updated when a new version of my application is released to the public....
  14. Replies
    1
    Views
    666

    VS 2012 Adding a file to an object

    I have developed an application that has a Sound Class. This Sound Class uses an external audio file that is referenced by a String data type that holds the filepath to the audio file.
    When I wish...
  15. Replies
    5
    Views
    1,000

    VS 2012 Re: TryParse a number

    Basically, convert the variable with simple formatting. I have got it working.
  16. Replies
    5
    Views
    1,000

    VS 2012 Re: TryParse a number

    Thanks.

    If I have a value stored as say 12,345 or 12345, how can easily increment it to 12,346 or 12346? Is there an easier way rather than having to do a string search for the , before the adding...
  17. Replies
    5
    Views
    1,000

    VS 2012 TryParse a number

    I have a textbox that can hold numbers. I am wanting to ensure that the textbox contains only numbers. Integer.TryParse works well for this, however, is there a way to let numbers such as 7,945 be...
  18. Replies
    4
    Views
    1,299

    VS 2012 Re: Select items in a ListView

    Thanks.
  19. Replies
    4
    Views
    1,299

    VS 2012 Re: Select items in a ListView

    Is this the correct way to select the items:


    For x = 0 To ListOfSelectedItemsInListView.Count - 1
    ListViewFields.Items(x).Selected = True
    Next

    No controls are...
  20. Replies
    4
    Views
    1,299

    VS 2012 Select items in a ListView

    Here is my code:


    Dim ListOfSelectedItemsInListView As New List(Of Integer)
    For Each ListViewItem As ListViewItem In ListViewFields.SelectedItems
    ...
  21. Replies
    4
    Views
    1,011

    VS 2012 Re: Get Font Styles for a Font

    I am talking about the styles that are associated with a font when displayed in a Font dialog. When different fonts are selected, different styles for the selected font are shown. Is it possible to...
  22. Replies
    4
    Views
    1,011

    VS 2012 Get Font Styles for a Font

    If I have had a search online with no result.

    How can I get a listing of the styles associated with a font where I know the font name?
  23. VS 2012 TypeInitializationError was unhandled by user code

    I am getting the following error:


    An exception of type 'System.TypeInitializationException' occurred in CanSubliminalMessaging.exe but was not handled in user code

    Additional information: The...
  24. VS 2012 Convert a variable to a type based from a type variable

    If I have a Type variable, can I convert a String to the same type as the Type variable without manually use a CBool, CInt, CLng statement? Does the Type (or other) class have such a function for...
  25. Replies
    1
    Views
    606

    VS 2012 Adding items to a ListView

    I have a list of t and am wishing to add this list to a listview. I have coded a class that has an object that specifies the name, text and width of each column for the listview.

    What is the best...
  26. VS 2012 Re: Pass a List of T as a parameter and storing the List

    If I declare the class to be generic, and the class is a form, how can I set attributes such as:


    Me.Text = "Form Text"

    This attribute does not exist. The form does not now know that it is a...
  27. VS 2012 Pass a List of T as a parameter and storing the List

    I am wanting to pass a List of T as a parameter of a function and in the function store the reference to this List so that I can add relevant items to this List.

    Here is my function code:


    ...
  28. Replies
    6
    Views
    1,742

    VS 2012 Re: Get list of duplicate name items

    I cannot get the syntax correct for this code.

    Here is my current code:


    Dim TestList As New List(Of Field)
    Dim TestListItemToAddToList As New Field
    ...
  29. Replies
    6
    Views
    1,742

    VS 2012 Re: Get list of duplicate name items

    The answer to your question is:
  30. Replies
    6
    Views
    1,742

    VS 2012 Get list of duplicate name items

    How is the best way to get a List of all the duplicate items in a List.

    Here is my current code that I am working on:


    Public Function GenerateDistinctNamesForObjectsinList(Of t As...
  31. Replies
    4
    Views
    733

    VS 2012 Re: Passing a Type as a parameter

    So basically, do I need to pass an object that has a type (or list in this case), and this determines the type of the list?
  32. Replies
    4
    Views
    733

    VS 2012 Passing a Type as a parameter

    Here is my function code:


    Public Function OpenListFromFile(Of t)(FileName As String) As List(Of t)
    'Do code
    End Function


    I know that I can call the function as follows:
  33. Replies
    9
    Views
    1,475

    VS 2012 Re: List of T

    Thanks.
  34. Replies
    9
    Views
    1,475

    VS 2012 [RESOLVED] List of T

    If I have a List of T, where the Type is an object that always has a .Name property, how I can write a function that returns the .Name value?

    Here is my code:


    Public Function...
  35. Replies
    0
    Views
    654

    VS 2012 Path of execution

    Is it possible, to 'mark' two lines of code, and at runtime, get the path of execution between these two lines of code? When I say the path of execution, I am wanting to know all of the lines of code...
  36. Replies
    3
    Views
    896

    VS 2012 Resume thread equivalent

    I currently have a background worker that has a do loop as well as a Thread.Sleep line of code.

    When I want to stop the background worker, currently the background worker will only stop after the...
  37. Replies
    2
    Views
    1,528

    VS 2012 Re: Stack Trace frames

    Thanks.
  38. Replies
    2
    Views
    1,528

    VS 2012 [RESOLVED] Stack Trace frames

    I have written a Sub to get the method name and line number of an exception.

    Here is my code:


    Public Sub ExceptionHandler(ex As Exception, DisplayTraceInformation As Boolean,...
  39. VS 2012 Re: Create an object from another objects type

    Ok, here is what I am trying to do...

    I have an application that has many Lists of T and each of these Lists has a Form to display the List Items.
    Each Form has the exact same code as any other...
  40. VS 2012 Create an object from another objects type

    In Visual Basic.net, can I create an Object with the type from another object.

    Here is some code:


    Dim TestObjectType As Author
    Dim TestObject As TestObjectType.GetType

    I am getting an...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width