Search Results

Search found 13 results on 1 pages for 'jessegavin'.

Page 1/1 | 1 

  • How to add SMS text messaging functionality to my website?

    - by jessegavin
    I want to add the ability to send reminders to people via email and SMS for specific events that they have signed up for on a web application that I am building. The email part is not difficult, but I am wondering where to find a good solution for sending SMS messages. It would also be a plus if this solution allowed two-way SMS communication with my web application so that people would be able to reply with a CONFIRM or CANCEL type of a message. Has anyone implemented something like this? Does anyone know of good tools out there? EDIT: I am realizing that this is more of a "lots of ways to skin this cat" type of question and so I changed it to community wiki.

    Read the article

  • SubSonic 3 ignoring columns in Select()

    - by jessegavin
    I have a table like so.. CREATE TABLE [dbo].[Locations_Hours]( [LocationID] [int] NOT NULL, [sun_open] [nvarchar](10) NULL, [sun_close] [nvarchar](10) NULL, [mon_open] [nvarchar](10) NULL, [mon_close] [nvarchar](10) NULL, [tue_open] [nvarchar](10) NULL, [tue_close] [nvarchar](10) NULL, [wed_open] [nvarchar](10) NULL, [wed_close] [nvarchar](10) NULL, [thu_open] [nvarchar](10) NULL, [thu_close] [nvarchar](10) NULL, [fri_open] [nvarchar](10) NULL, [fri_close] [nvarchar](10) NULL, [sat_open] [nvarchar](10) NULL, [sat_close] [nvarchar](10) NULL, [StoreNumber] [int] NULL, [LocationHourID] [int] IDENTITY(1,1) NOT NULL, CONSTRAINT [PK_Locations_Hours] PRIMARY KEY CLUSTERED ( [LocationHourID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] And SubSonic 3 is generating a class with the following properties int LocationID string monopen string monclose string tueopen string tueclose string wedopen string wedclose string thuopen string thuclose string friopen string friclose string satopen string satclose string sunopen string sunclose int? StoreNumber int LocationHourID When I try to perform a query against this class like so.. var result = DB.LocationHours.Where(o => o.LocationID == _locationId); This is the resulting SQL query that SubSonic generates. SELECT [t0].[LocationHourID], [t0].[LocationID], [t0].[StoreNumber] FROM [dbo].[Locations_Hours] AS t0 WHERE ([t0].[LocationID] = 4019) I cannot figure out why SubSonic is omitting the nvarchar fields when it generates the SELECT statement. Anyone got any ideas?

    Read the article

  • Error when specifying tag attributes in NHaml

    - by jessegavin
    I am just getting started with NHaml and ran into a snag. This is my application.haml file: %html %head %title = Get Some Data %link{ href="/media/css/styles.css", rel="Stylesheet", type="text/css" } %body %div.page %h1 = Get Some Data _ When I try to view in a browser it throw the following error: NHaml.Exceptions.SyntaxException: The attribute ',' is occurs twice. If I remove the line beginning with %link it works fine. What am I doing wrong? I am following the step-by-step from Brian Hartsock: http://blog.brianhartsock.com/2009/01/15/using-nhaml-from-source/#nhaml_reference

    Read the article

  • How to html encode the output of an NHaml view (or any MVC view)?

    - by jessegavin
    I have several views written in NHaml that I would like to render as encoded html. Here's one. %table.data %thead %tr %th Country Name %th ISO 2 %th ISO 3 %th ISO # %tbody - foreach(var c in ViewData.Model.Countries) %tr %td =c.Name %td =c.Alpha2 %td =c.Alpha3 %td =c.Number I know that NHaml provides syntax to Html encode the output for given lines using &=. However, in order to encode the entire view, I would essentially lose the benefit of writing my view in NHaml since it would have to look like this.... &= "<table class='data'> &= " <thead> So I was wondering if there was any cool way to be able to capture the rendered view as a string, then to html encode that string. Maybe something like the following??? public ContentResult HtmlTable(string format) { var m = new CountryViewModel(); m.Countries = _countryService.GetAll(); // Somehow render the view and store it as a string? // Not sure how to achieve this. var viewHtml = View("HtmlTable", m); // ??? return Content(viewHtml); } This question may actually have no particular relevance to the View engine that I am using I guess. Any help or thoughts would be appreciated.

    Read the article

  • How to html encode the output of an MVC view?

    - by jessegavin
    I am building a web app which will generate lots of different code templates (HTML tables, XML documents, SQL scripts) that I want to render on screen as encoded HTML so that people can copy and paste those templates. I would like to be able to use asp.net mvc views to generate the code for these templates (rather than, say, using a StringBuilder). Is there a way using asp.net mvc to store the results of a rendered view into a string? Something like the following perhaps? public ContentResult HtmlTable(string format) { var m = new MyViewModel(); m.MyDataElements = _myDataRepo.GetData(); // Somehow render the view and store it as a string? // Not sure how to achieve this part. var viewHtml = View(m); var htmlEncodedView = Server.HtmlEncode(viewHtml); return Content(htmlEncodedView); } NOTE: My original question mentioned NHaml views specifically, but I realized that this wasn't view engine specific. So if you see answers related to NHaml, that's why.

    Read the article

  • How to replace 'dash' with 'underscore' in an IIRF rule?

    - by jessegavin
    I have a web app which serves images based on the subdomain. We wanted to provide our users with a url like this: http://{username}.domain.com/images/myimage.jpg Instead of what we used to have: http://www.reallylongdomainname.com/users/{username}/images/myimage.jpg This makes the url shorter and less 'snoopable'. So I set up an IIRF .ini file to do some url rewriting and it works great except for the fact that some of our users folders have an underscore. And from what I've read, underscore is not a valid character in a domain name (even though IIS supports it). I want to know how I could do a find and replace in the $1 back reference so that a url like this: http://some-user.domain.com/... Could be rewritten to this: /users/some_user/.. Here's my IIRF rule. RewriteCond %{HTTP_HOST} ^(?!www)([^\.]+)\.domain\.com RewriteRule ^/(.*)$ /users/*1/$1 [L,I] Thanks for any help.

    Read the article

  • How is the order of execution for HttpModules determined?

    - by jessegavin
    Suppose that both FirstModule and SecondModule handle the Application_BeginRequest event. Will it execute in the order defined in the web.config? <httpModules> <add type="MyApp.FirstModule, MyApp" name="FirstModule"/> <add type="MyApp.SecondModule, MyApp" name="SecondModule"/> <add type="OtherApp.OtherModule, OtherApp" name="OtherModule"/> </httpModules> Are there other ways that the order can be specified?

    Read the article

  • How to force positioned elements to stay withing viewable browser area?

    - by jessegavin
    I have a script which inserts "popup" elements into the DOM. It sets their top and left css properties relative to mouse coordinates on a click event. It works great except that the height of these "popup" elements are variable and some of them extend beyond the viewable area of the browser window. I would like to avoid this. Here's what I have so far <script type="text/javascript"> $(function () { $("area").click(function (e) { e.preventDefault(); var offset = $(this).offset(); var relativeX = e.pageX - offset.left; var relativeY = e.pageY - offset.top; // 'responseText' is the "popup" HTML fragment $.get($(this).attr("href"), function (responseText) { $(responseText).css({ top: relativeY, left: relativeX }).appendTo("#territories"); // Need to be able to determine // viewable area width and height // so that I can check if the "popup" // extends beyond. $(".popup .close").click(function () { $(this).closest(".popup").remove(); }); }); }); }); </script>

    Read the article

  • How to get original url after HttpContext.RewritePath() has been called.

    - by jessegavin
    I am working on a web app which makes use of a 3rd party HttpModule that performs url rewriting. I want to know if there's any way to determine the original url later on in Application_BeginRequest event. For example... Original url: http://domain.com/products/cool-hat.aspx Re-written url (from 3rd party httpmodule): http://domain.com/products.aspx?productId=123 In the past I have written HttpModules that store the original url in HttpContext.Items but, this is a 3rd party app and I have no way of doing that. Any ideas would be appreciated.

    Read the article

  • Better to combine & minify javascript or use Google CDN?

    - by jessegavin
    I am building a site which currently uses javascript from several sources: Group 1: Google Maps API v3 (hosted by Google) Group 2: jQuery & swfobject (hosted on Google CDN) Group 3: Several jQuery plugins and non-jquery javascript files (hosted on my server) I am using Justin Etheredge's tool SquishIt to combine and minify all the javascript files that are hosted on my server (group 3). I am wondering if the site would 'feel' faster to users if I were to host the files in (group 2) locally so that they can be combined with all the other files in (group 3) and requiring only one HTTP request for groups 2 & 3. This would mean that I don't get the benefits of the Google CDN however. Does anyone have any advice on this matter?

    Read the article

  • How to vertically center content with variable height within a div?

    - by jessegavin
    What is the best way to vertically center the content of a div when the height of the content is variable. In my particular case, the height of the container div is fixed, but it would be great if there were a solution that would work in cases where the container has a variable height as well. Also, I would love a solution with no, or very little use of CSS hacks and/or non-semantic markup.

    Read the article

1