Search Results

Search found 26912 results on 1077 pages for 'default programs'.

Page 57/1077 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • ASP .net MVC Invoking default controller and action vs Setting a startup page

    - by SARAVAN
    Hi, I am developing code on the sample ASP .net MVC template provided by VS2010. The first time I ran the code without adding anything, the index.aspx page was invoked which is expected. But for some reasons I added a login.aspx and then accidentally set that as a startup page. Now when I ran the application the default startup url look like http://localhost/Views/login.aspx. I am thinking this is not a valid MVC routing path and I get the requested resource cannot be found error. I am not sure how to revert this back and make sure the default ../home/index is invoked. Can any one throw some light on this? Also should I not set the startup page as we do in asp .net webforms?

    Read the article

  • jQuery default/placeholder input text and problems with saved information

    - by user318106
    Hey Guys, I'm new to jQuery and have an annoying problem. I have some login fields that are filled with default text when the field is empty and then removed when clicked. My problem is that when the user has their username/password saved (with browser), if they return to the page the login fields are filled with the users saved input as well as the default input. $('#login input.text').each(function(i, field) { field = $(field); if (field.val().length 0) { field.prev().css('display', 'none'); } field.focus(function() { field.prev().css('display', 'none'); }).blur(function() { if (field.val() == '') field.prev().css('display', 'block'); }); })

    Read the article

  • Setting property default values for a Web User Control

    - by Jeremy Holland
    I am trying to build a web user control and set some default values for its properties in the code-behind like this: [DefaultValue(typeof(int), "50")] public int Height { get; set; } [DefaultValue(typeof(string), "string.Empty")] public string FamilyName { get; set; } [DefaultValue(typeof(Color), "Orange")] public System.Drawing.Color ForeColor { get; set; } When I add the user control to the page and call it without any properties: <uc1:Usercontrol ID="uc" runat="server" /> the default values are not set and every property is 0 or null. What am I doing wrong? Thanks.

    Read the article

  • MVC4 link automatically redirected to default INDEX page/action even if defined action name with controller

    - by Raj Tamakuwala
    i am creating web mobile application in mvc4. My problem is when I click on particular link in my application,it works well, but sometimes it automatically redirected to INDEX page that is set as default page in global.asax as routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); Now I don't know why its automatically redirected to INDEX page,even if I have already defined controller and action name where it show redirected as, <a href='@(Url.Action( "ActivityWall", "Home"))' > </a> logically it should redirect to "ActivityWall" page,which it does.but sometime only it goes to INDEX page.then when I clear my cookie problem will again solved but after some time it again start redirecting to INDEX page. I also posted question related to cookies issue yesterday,but I think that is nit main issue. can someone help please ?

    Read the article

  • Why won't C++ allow this default value

    - by nieldw
    Why won't GCC allow a default parameter here? template<class edgeDecor, class vertexDecor, bool dir> Graph<edgeDecor,int,dir> Graph<edgeDecor,vertexDecor,dir>::Dijkstra(vertex s, bool print = false) const { This is the output I get: graph.h:82: error: default argument given for parameter 2 of ‘Graph<edgeDecor, int, dir> Graph<edgeDecor, vertexDecor, dir>::Dijkstra(Vertex<edgeDecor, vertexDecor, dir>, bool)’ graph.h:36: error: after previous specification in ‘Graph<edgeDecor, int, dir> Graph<edgeDecor, vertexDecor, dir>::Dijkstra(Vertex<edgeDecor, vertexDecor, dir>, bool)’ Can anyone see why I'm getting this?

    Read the article

  • Objective-C / C giving enums default values

    - by bandejapaisa
    I read somewhere about giving enums default values like so: typedef enum { MarketNavigationTypeNone = 0, MarketNavigationTypeHeirachy = 1, MarketNavigationTypeMarket = 2 } MarketNavigationLevelType; .. but i can't remember the value of doing this. If i don't give them default values - and then someone later on reorders the enum - what are the risks? If i always use the enum name and don't even refer to them by their integer value, is there any risks? The only possible problem i can think of is if i'm initialising an enum from an int value from a DB - and the enum is reordered - then the app would break.

    Read the article

  • create_function with default parameter values?

    - by SoLoGHoST
    Ok, I'm looking into using create_function for what I need to do, and I don't see a way to define default parameter values with it. Is this possible? If so, what would be the best approach for inputting the params into the create_function function in php? Perhaps using addslashes? Well, for example, I have a function like so: function testing($param1 = 'blah', $param2 = array()) { if($param1 == 'blah') return $param1 else { $notblah = ''; if (count($param2) >= 1) { foreach($param2 as $param) $notblah .= $param; return $notblah; } else return 'empty'; } } Ok, so how would I use create_function to do the same thing, adding the parameters and their default values? The thing is, the parameters are coming from a TEXT file, as well as the function itself. So, wondering on the best approach for this using create_function and how exactly the string should be parsed. Thanks :)

    Read the article

  • jquery.validation - how to ignore default values when validating mandatory fields

    - by jack
    I am using jquery validation plugin to validate a registration form. Each text input field has instructions pre-filled as values in the input box ex: for a text-input box id='Name', the default value will be set to 'Enter Your Name'. I have pasted below sample code: <input type="text" id="Name" value="Enter Your Name" onfocus="if(this.value == 'Your Name'){this.value = '';}" type="text" class="required" onblur="if(this.value == ''){this.value='Your Name';}" size="25" /> What I need to know is how to specify in the validation rule such that the plugin throws a required field error if the input box contains either the default message or empty values. Help much appreciated.

    Read the article

  • Html.RadioButton group defaulting to 0

    - by awrigley
    Hi A default value of 0 is creeping into a Surveys app I am developing, for no reason that I can see. The problem is as follows: I have a group of Html.RadioButtons that represent the possible values a user can choose to answer a survey question (1 == Not at all, 2 == A little, 3 == A lot). I have used a tinyint datatype, that does not allow null, to store the answer to each question. The view code looks like this: <ol class="SurveyQuestions"> <% foreach (SurveyQuestion question in Model.Questions) { string col = question.QuestionColumn; %> <li><%=question.QuestionText%> <ul style="float:right;" class="MultiChoice"> <li><%= Html.RadioButton(col, "1")%></li> <li><%= Html.RadioButton(col, "2")%></li> <li><%= Html.RadioButton(col, "3")%></li> </ul> <%= Html.ValidationMessage(col, "*") %> </li> <% } %> </ol> [Note on the above code:] Each survey has about 70 questions, so I have put the questions text in one table, and store the results in a different table. I have put the Questions into my form view model (hence Model.Questions); the questions table has a field called QuestionColumn that allows me to link up the answer table column to the question, as shown above (<%= Html.RadioButton(col, "1")%, etc) [/Note] However, when the user DOESN'T answer the question, the value 0 is getting inserted into the database column. As a result, I don't get what I expect, ie, a validation error. In no place have I stipulated a default value of 0 for the fields in the answers table. So what is happening? Any ideas?

    Read the article

  • Discovering the default gateway without DHCP

    - by JavaRocky
    A crazy question, but is there anyway to discover the default gateway without DHCP? This would be for a device on a network which does not use DHCP which does not have an IP address as yet. I was thinking if I could discover the default gateway, then i could try to guess an unused ip address then broadcast on the network to see if it's being used. I may be asking for trouble i understand. E.g. if there is already a computer which has a static IP and is shutdown.

    Read the article

  • Rails 3 respond_to: default format?

    - by bdorry
    I am converting a Rails 2 application to Rails 3. I currently have a controller set up like the following: class Api::RegionsController < ApplicationController respond_to :xml, :json end with and an action that looks like the following: def index @regions = Region.all respond_with @regions end The implementation is pretty straightforward, api/regions, api/regions.xml and api/regions.json all respond as you would expect. The problem is that I want api/regions by default to respond via XML. I have consumers that expect an XML response and I would hate to have them change all their URLs to include .xml unless absolutely necessary. In Rails 2 you would accomplish that by doing this: respond_to do |format| format.xml { render :xml => @region.to_xml } format.json { render :json => @region.to_json } end But in Rails 3 I cannot find a way to default it to an XML response. Any ideas?

    Read the article

  • host the silverlight application in a new website(default.aspx)

    - by Piyush
    when I create new silverlight project it asks Host the Silverlight application in a new Website followed by two fields- 1. Name: projectName.web 2. Type: ASP.Net Web Application Project OR Asp.Net Web Site when I uncheck this checkbox VS doen not create projectName.web project but when I check this VS creates two projects 1. projectName--contains .xaml pages 2. projectName.web-- contains default.aspx page.................. So my question is - Is it must to host silverlight app from a new website(default.aspx page) OR cant we directly host .xaml page? ProjectName.Web project is req.?? –

    Read the article

  • Get back the default browser styling for input fields

    - by meo
    I need to style all the input fields but one. So i have set a rule for all the inputs on the site. For the seachfield i need to use the browser default, so i was thinking i could just inherit all the values i have set for the general input fields. (have tried border: none to) This does not work in FF nor Safari :( The border just gets transparent. http://jsfiddle.net/N5KKH/1/ Any idea how i could get the default browser styling back? EDIT: i need the first input field look like the second one: http://jsfiddle.net/N5KKH/2/

    Read the article

  • Calling base class constructor

    - by The Void
    In the program below, is the line Derived(double y): Base(), y_(y) correct/allowed? That is, does it follow ANSI rules? #include <iostream> class Base { public: Base(): x_(0) { std::cout << "Base default constructor called" << std::endl; } Base(int x): x_(x) { std::cout << "Base constructor called with x = " << x << std::endl; } void display() const { std::cout << x_ << std::endl; } protected: int x_; }; class Derived: public Base { public: Derived(): Base(1), y_(1.2) { std::cout << "Derived default constructor called" << std::endl; } Derived(double y): Base(), y_(y) { std::cout << "Derived constructor called with y = " << y << std::endl; } void display() const { std::cout << Base::x_ << ", " << y_ << std::endl; } private: double y_; }; int main() { Base b1; b1.display(); Derived d1; d1.display(); std::cout << std::endl; Base b2(-9); b2.display(); Derived d2(-8.7); d2.display(); return 0; }

    Read the article

  • Inlining an array of non-default constructible objects in a C++ class

    - by porgarmingduod
    C++ doesn't allow a class containing an array of items that are not default constructible: class Gordian { public: int member; Gordian(int must_have_variable) : member(must_have_variable) {} }; class Knot { Gordian* pointer_array[8]; // Sure, this works. Gordian inlined_array[8]; // Won't compile. Can't be initialized. }; As even beginner C++ users know, the language guarantees that all members are initialized when constructing a class. And it doesn't trust the user to initialize everything in the constructor - one has to provide valid arguments to the constructors of all members before the body of the constructor even starts. Generally, that's a great idea as far as I'm concerned, but I've come across a situation where it would be a lot easier if I could actually have an array of non-default constructible objects. The obvious solution: Have an array of pointers to the objects. This is not optimal in my case, as I am using shared memory. It would force me to do extra allocation from an already contended resource (that is, the shared memory). The entire reason I want to have the array inlined in the object is to reduce the number of allocations. This is a situation where I would be willing to use a hack, even an ugly one, provided it works. One possible hack I am thinking about would be: class Knot { public: struct dummy { char padding[sizeof(Gordian)]; }; dummy inlined_array[8]; Gordian* get(int index) { return reinterpret_cast<Gordian*>(&inlined_array[index]); } Knot() { for (int x = 0; x != 8; x++) { new (get(x)) Gordian(x*x); } } }; Sure, it compiles, but I'm not exactly an experienced C++ programmer. That is, I couldn't possibly trust my hacks less. So, the questions: 1) Does the hack I came up with seem workable? What are the issues? (I'm mainly concerned with C++0x on newer versions of GCC). 2) Is there a better way to inline an array of non-default constructible objects in a class?

    Read the article

  • parsing command option with default values and range constrains in C

    - by agramfort
    Hi, I need to parse command line arguments in C. My arguments are basically int or float with default values and range constrains. I've started to implement something that look like this: option_float(float* out, int argc, char* argv, char* name, description, float default_val, int is_optional, float min_value, float max_value) which I call for example with: float* pct; option_float(pct, argc, argv, "pct", "My super percentage option", 50, 1, FALSE, 0, 100) however I don't want to reinvent the wheel ! My objective is to have error checking of range constrains, throw an error when the option is not optional and is not set. And generate the help message usually given by usage() function. The usage text would look like this: --pct My super percentage option (default : 50). Should be in [0, 100] I've started with getopt but it is too limited for what I want to do and I feel it still requires me to write too much code for a simple usecase like this. thanks

    Read the article

  • tortoisesvn - Error REPORT request failed on ../../../!svn/vcc/default

    - by John
    Users attempting to check out files from a particular Subversion 1.4.x repository with Apache 2.2 on Windows 2003 have suddenly begun getting an error message in their log windows upon checkout with TortoiseSVN 1.4: Error REPORT request failed on '/[path_to_repo]/!svn/vcc/default' Error REPORT of '/[path_to_repo]/!svn/vcc/default': 200 OK (http://[server_name]) This started following an hd crash on the server and subsequent restore of about 10 subversion repositories. Only one repository is having this problem after an attempted working directory reconciliation. The repo owner reconcile their working directory with the repository by modifying/deleting the hidden .svn directories (though this was not advised). I can't find anything on the Internets that represents my situation. The restored server is exactly as the original and no other repositories on this server are throwing errors. Any ideas on 1) what this error is and 2) how to fix it?

    Read the article

  • URL Routing to Default Page

    - by ewitkows
    Hi everyone, I have an asp.net 4.0 web forms app setup with url rereouting. In development, my app's URL looks perfect. I have a page called enrollnow.aspx that responds to the routing, so if I type in localhost/enrollnow/abc, my app responds as expected. Once promoted into my staging environment however, the URL is off. I have a domain, and a virtual dir created off of my domain called "enrollnow". So basically, my URL outside of development is: mydomain.com/enrollnow/enrollnow/abc - where the first enrollnow is the directory, the second enrollnow is the page name, and the abc is my route value. Is there any way I can have the "default page" respond, so the second enrollnow (which is enrollnow.asp) isnt required? Perhaps I can rename my enrollnow.aspx page to default.aspx, or I can change the mapping in my routetable? Heres my routetable, incase that helps. thanks! Routetable: RouteTable.Routes.Add("PURLRoute", New Route("EnrollNow/{PURL_ID}", New PageRouteHandler("~/EnrollNow.aspx")))

    Read the article

  • How to use default.ctp in cakephp

    - by Louis Stephens
    I just finished the "15 min Blog Post tutorial" included in the documentation for cakephp. I was asked for another tutorial to change the layout for first tutorial. However, I am fairly new to MVC programming/Cakephp and I have no real clue how to do so. Well, I know I need "default.ctp" placed in app/views/layouts/ and I presume I need to include to include my data? . . . I am really at a loss of what to do. I set up my default.ctp as I mentioned above, but when I go to localhost:9999/posts the layout is still the same. I guess I need to include a stylesheet (and if so, where?) I guess if someone can point me in the right direction to a beginner's guide to layout styling or how to use it I would greatly appreciate any help.

    Read the article

  • SQL insert default value

    - by Stan
    Say if I have a table like CREATE TABLE [Message] ( [MessageIdx] [int] IDENTITY (1, 1) NOT NULL , [Message] [varchar] (1024) COLLATE Latin1_General_CI_AS NOT NULL , [ValidUntil] [datetime] NULL , CONSTRAINT [PK_Message] PRIMARY KEY CLUSTERED ( [MessageIdx] ) WITH FILLFACTOR = 90 ON [PRIMARY] ) ON [PRIMARY] GO I am trying to insert value without specify column names explicitly. Below statement causes error. How can I do that? Thanks. set identity_insert caconfig..fxmessage on; insert into message values (DEFAULT,'blah',DEFAULT); set identity_insert caconfig..fxmessage off;

    Read the article

  • Horizontal scroll in rich:panel to default right to left

    - by TaylorSmolik
    I have a rich:panel with a style="overflow: scroll" tag inside. By default, the scroll slides left to right. I am constantly adding a new dataTable to a dataGrid with the click of a button and I want the user to always see the most recent one, and since I have it set up so that each dataTable is added as a column to the dataGrid, the most recent one will always be on the right side of the dataGrid. Is there a way I can default the scroll to go right to left? Or maybe creating the columns from right to left?

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >