Search Results

Search found 15 results on 1 pages for 'aspdotnetuser'.

Page 1/1 | 1 

  • Visual Studio search feature does not seem to be searching for text in CSS files [migrated]

    - by aspdotnetuser
    I noticed that when using Visual Studio's 'Find in files' search feature, it does not appear to search/find text in CSS files even though the text does exist. I can't find anything on the net regarding this issue and cannot determine even if Visual Studio allows you to search for text within CSS files. Hopefully someone can shed some light on this; Is it supposed to allow you to do this? If so, what reasons would explain why this is not working?

    Read the article

  • How to make Unit Tests to make sure stored procedure is deleting row from the database?

    - by aspdotnetuser
    I'm new to unit testing and I need some help with the following. I have created a small project to help me learn how to make Unit Tests. The functionality for one of the forms in my application deletes a user from the User table (and other rows in mapping tables). Currently, the unit test I have created to test this sets up the required objects and then calls the business rules method (passing in the user id) which calls the data access method to execute the stored procedure that deletes the rows in the tables. Is this the correct method to test whether something is being deleted successfully? Should the unit test / setup method first insert some test data which the unit test then deletes?

    Read the article

  • Port numbers in Visual Studio projects and IIS

    - by aspdotnetuser
    I have a few questions about localhost and port numbers as this is an area where I do not have a lot of knowledge, and because I recently had to work with setting up Visual Studio projects and IIS and there are things I'm not clear on. I have the following questions on the things I find confusing. I thought it made more sense to include them all in one question instead of making separate questions. I have noticed a random port number is generated with projects I have worked on in the past, but I recently saw a project where the port number was fixed. What is the purpose of having a fixed/default localhost port number? i.e is it particularly useful on projects that have many programmers working on the project? If a solution contains multiple projects (for example, WCF services, Domain, MVC/Web pages), is it possible to setup a different localhost port for each of them? If so, what is the benefit of this? If a solution contains multiple projects and has different localhost urls/port numbers, must there be a corresponding website (and application pool) for each project in IIS? Or just for the project that contains the actual web pages?

    Read the article

  • Is this method of writing Unit Tests correct?

    - by aspdotnetuser
    I have created a small C# project to help me learn how to write good unit tests. I know that one important rule of unit testing is to test the smallest 'unit' of code possible so that if it fails you know exactly what part of the code needs to fixed. I need help with the following before I continue to implement more unit tests for the project: If I have a Car class, for example, that creates a new Car object which has various attributes that are calculated when its' constructor method is called, would the two following tests be considered as overkill? Should there be one test that tests all calculated attributes of the Car object instead? [Test] public void CarEngineCalculatedValue() { BusinessObjects.Car car= new BusinessObjects.Car(); Assert.GreaterOrEqual(car.Engine, 1); } [Test] public void CarNameCalculatedValue() { BusinessObjects.Car car= new BusinessObjects.Car(); Assert.IsNotNull(car.Name); } Should I have the above two test methods to test these things or should I have one test method that asserts the Car object has first been created and then test these things in the same test method?

    Read the article

  • Is the structure used for these web pages a design pattern?

    - by aspdotnetuser
    I want to know if the structure for an ASP.NET website I'm working on uses a design pattern for it's web pages. If it is a design pattern, what is it called? The web pages have the following structure: UserDetails page (UserDetails.aspx) - includes UserDetailsController.ascx user control. UserDetailsController.ascx includes sub user controls like UserAccountDetails.ascx and UserLoginDetails.ascx etc Each sub user control contains a small amount of code/logic, the 'controller' user controls that host these sub user controls (i.e UserDetailsController.ascx) appear to call the business rules code and pass the data to the sub user controls. Is this a design pattern? What is it called?

    Read the article

  • Is this the correct way to implement .NET MVC website structure?

    - by aspdotnetuser
    I have recently seen a .NET MVC solution in which the markup in the .aspx views have a Controller as their model, and the .ascx user controls they contain use a separate model. I'm new to MVC and I wanted to find out about a few things I'm not clear on. An example of how the code is implemented: UserDetails.aspx view has markup that shows it's using the UserDetailsController.cs as the model. It contains RenderPartial("User_Details.ascx", UserDetailsModel) and passes it the UserDetailsModel. Is this the standard/correct way of implementing MVC? Or just one way to implement it? I also noticed that the classes used as Models appear to be Service classes that have [DataMember] and [DataContract] attributes on the class name and properties - what is the advantage of this implementation?

    Read the article

  • Should this code/logic be included in Business Objects class or a separate class?

    - by aspdotnetuser
    I have created a small application which has a three tier architecture and I have business object classes to represent entities such as User, Orders, UserType etc. In these classes I have methods that are executed when the Constuctor method of, for example, User is called. These methods perform calculations and generate details that setup data for attributes that are part of each User object. Here is the structure for the project in Visual Studio: Here is some code from the business object class User.cs: Public Class User { public string Name { get; set; } public int RandomNumber { get; set; } etc public User { Name = GetName(); RandomNumber = GetRandomNumber(); } public string GetName() { .... return name; } public int GetRandomNumber() { ... return randomNumber; } } Should this logic be included in the Business Object classes or should it be included in a Utilities class of some kind? Or in the business rules?

    Read the article

  • Using Regex.Replace() to replace text in a string

    - by aspdotnetuser
    Hi, I want to use Regex.Replace() to loop through a string containing words that are separated by '//' to check if any of the words match a string value which has been passed to the method. Here's my code at the moment: public void CheckText(string text) { //Check text entered by user string wordList = "word1//word2//word3 etc..."; string replaceString = "matched"; if (!string.IsNullOrEmpty(wordList)) { return Regex.Replace(text, wordList); //How do I implement this part? } } Please could someone help me with this? Any help/comments will be appreciated! Thanks,

    Read the article

  • How to use jQuery to make a call to HttpHandler to get return value

    - by aspdotnetuser
    I want to use jQuery to make a call to a c# web service called c.ashx which checks whether that username is valid and returns an error message as a string. What should I put for data: and content type: if the return value of the c# webservice is a string value? jQuery.ajax({ type: "GET", url: "/services/CheckUserName.ashx", data: "", contenttype: "", success: function (msg) { alert("success"); }, error: function (msg, text) { alert(text); } });

    Read the article

  • How to use jQuery to make a call to c# webservice to get return value

    - by aspdotnetuser
    I want to use jQuery to make a call to a c# web service called c.ashx which checks whether that username is valid and returns an error message as a string. What should I put for data: and content type: if the return value of the c# webservice is a string value? jQuery.ajax({ type: "GET", url: "/services/CheckUserName.ashx", data: "", contenttype: "", success: function (msg) { alert("success"); }, error: function (msg, text) { alert(text); } });

    Read the article

  • SVN branch question

    - by aspdotnetuser
    Hi, When creating a branch, what are the implications of selecting the following? Create copy in the repository from: HEAD revision in the repository Specific revision the repository Working copy

    Read the article

  • webservice doesn't get called by jQuery

    - by aspdotnetuser
    Hi, I want to call a webservice using jQuery.ajax() but the webervice doesn't get called. - If I change the url: to reference a .ashz file it gets called but not .asmx? Here's the code I'm using: jQuery.ajax({ type: "POST", url: "/services/CheckUsername.asmx/CheckUsername", // this doesn't get called //url: "/services/CheckUsername.ashx/ProcessRequest", this gets called data: '{ "context": "' + "username" + '"}', contentType: 'application/json; charset=utf-8', dataType: 'json', success: function (msg) { alert("Result: " + msg); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert("Error: " + textStatus) } The .ashz file gets called but a parsererror is retuned because it's returning http context - how can I modify this to get a string return type from a webservice? Thanks,

    Read the article

  • Subversion branch question

    - by aspdotnetuser
    Hi, If you have created a branch and are working with the files in that branch, when you 'update' it, is it updating/merging the code in the branch with the code in the trunk? Also, when you have commited your changes to the branch, how do you update the trunk with your changes? (since you commit the changes and have to switch to the trunk again?) Any comments will be appreciated :) Thanks,

    Read the article

  • How to use jQuery to make a call to c# file to get return value

    - by aspdotnetuser
    Hi, I want to use jQuery to make a call to a c# web service called CheckUserName.ashx which checks whether that username is valid and returns an error message as a string. How can I use to jQuery to do this? Would the code be something like the following? jQuery.ajax({ type: "GET", url: "/services/VerifyUsername.ashx", data: "ErrorMessage", success: function (msg) { alert("success"); }, error: function (msg, text) { alert(text); } }); }); Any help will be appreciated! Thanks,

    Read the article

1