C# - Equivalent To The Rails Auto_link Helper?
Feb 2, 2010
A fast function for scanning text for urls and turning them into html hyperlinks would be very nice... I'd write one but I feel like the odds of someone already having written one are high...
View 1 Replies
Similar Messages:
Jan 8, 2010
In Ruby on Rails you can write a simple controller action such as:
def index
@movies = Movies.find(:all)
respond_to do |format|
format.html #index.html.erb
format.xml { render :xml => @movies }
format.json { render :json => @movies }
end
end
For those unfamiliar with RoR, def index in this case would be the equivalent of public ActionResult Index() within an ASP.Net MVC Controller and would allow the following calls:
[URL] returns as an html page from the view index.html.erb (think index.aspx)[URL] returns the same data in xml format (@movies is the object containing the data all of the views use)[URL] returns a JSON string, useful when making javascript calls needing the same data/logic
An equivalent flow in ASP.Net MVC would (if possible) likely look something like this (if it could be less verbose, even better):
[code]....
View 3 Replies
Mar 29, 2010
I'm new to ASP.NET MVC and come from a Ruby on Rails background. In Ruby on Rails you can use the "runner" script (http://guides.rubyonrails.org/command_line.html#runner) to load up the app along with the rails framework and then run a script that accesses the model, etc. I use this to run scripts that fetch data from other databases and then insert it into my app's db using the methods on the model classes.s there a similar option in ASP.NET MVC?
View 3 Replies
Jan 20, 2010
Now before I dive too far into this this question, I am aware of nDjango and MonoRail; however, those project seem to be lacking.What I'm wondering is if there is a solution out in the .Net world that has the following features out of a single box like Rails has in Ruby or Django has for Python. I know tools that do pieces but am curious if there's 1 unified solution out there.
Database Versioning/Migrations
ORM or similar code gen
MVC-based
Pre-generated administrative screens
View generation
Theming / styling
(I'm sure I'm forgetting another cornerstone feature)
There's lots of options that cover one or more of these aspects but is there something in .Net that covers all of them?
View 5 Replies
Nov 30, 2010
If you were starting a new web development project would you use ASP.Net MVC 2 or Ruby on Rails?
I have recently invested some time in to learning Ruby on Rails because I wanted to learn a solid web development framework. Then I took a new job where I will be using ASP.Net MVC 2.
I know this question is very subjective, but I am planning to write some websites on my own, outside of work, and I would like to get some opinions from others.
View 4 Replies
Nov 16, 2010
I am investing some time in learning ASP.NET and more specifically ASP.NET MVC and I am curious how it stacks up to the competition. I really like what I am seeing so far with the framework, and I think the icing on the cake would be if it shows rock solid speed like I have seen with some ASP.NET form sites.
Has anyone done or seen fair comparisons or benchmarks? I would be interested to see how ASP.NET MVC stacks up against other solutions such as PHP MVC too.
View 2 Replies
May 13, 2010
My friend and I want to write a Facebook application. We've narrowed down the list of possible technologies to Ruby on Rails and C# with ASP. Here are the pros and cons we've thought of.
Cons:
ASP - proprietary tools like Visual Studio etc. cost (lots of) money. We both don't know ASP (although we're not bad at C#).
RoR - It's scripting so might be harder to maintain. My friend doesn't know RoR at all (but he's a fairly proficient programmer so will probably be able to pick it up quickly).
Pros:
ASP - Facebook has an official SDK for .NET.
RoR - I know RoR. It's open source, free and has fast development time.
What says the community? Is there something we haven't thought of?
View 2 Replies
Mar 27, 2010
I am a PHP developer migrating to C# ASP.Net Framework. As of right now, I am experienced in using Php for developing sites and I use CakePhp and Zend framework as my RAD tools to produce better applications.
As I move over to ASP.NET, I have this view that C# ASP.Net framework itself is already a RAD tool and is equivalent to using Cakephp, Zend, or even Ruby on Rails. So I really shouldn't have no concerns trying to find a separate library for ASP.NET that will better applications. To me, in a sense the ASP.NET is already like a MVC cause it seperates the model from the view and the methods are almost like controllers.
View 1 Replies
Mar 12, 2010
I need to create a simple webservice in C# but I'm not sure where to start (I've coded UI apps in C# before but all my web experience is in Ruby on Rails). Where do I start?
The only client for the webservice will be a Ruby on Rails app so there's no need for any HTML rendering. I was thinking of just returning a XML or YAML formatted string unless there's an easier way. I'm not too keen on SOAP but if it's easy/natural in C# & Ruby then I'd consider it (or anything else).
View 4 Replies
May 8, 2010
I want to build a scalable dynamic Web Application. I have never programmed an Object Oriented language before. Or, let's just say I am completely new to programming, because the previous experiences aren't worth talking about.
I know I have a really big task ahead of me ^^ but I wanted to get into coding for the last 10 years and now that I'm finally doing it, I would like to know how to get there in the most efficient way.
Any good books/tutorials you could recommend?
View 4 Replies
Dec 3, 2010
I'm predominantly a .Net developer but am wanting to look into ruby on rails.
Has anyone else been in this situation? And can they recommend any good books/tutorials/general resources for someone wanting to cross over?
View 3 Replies
Jan 31, 2010
We have a fairly large system involving multiple applications running on Windows, written in .NET. These include a number of web applications using ASP.NET.
We have a number of unrelated web applications written in LAMP - Linux/Apache/MySQL/Php.
The greatest advantage we've seen in ASP.NET is the ease with which code can be shared between web applications, win-form applications, windows console applications, and windows services. We have signficant code in .NET assemblies that are shared across all of these environments.
Apache/Php has some significant advantages over ASP.NET as a web programming environment, but if there is anything in it that is equivalent to .NET when it comes to integrating code that is shared across non-web applications, I'm unaware of it.
View 2 Replies
Jul 30, 2010
What's the equivalent of PHP's $_FILES variable in C#? Or at least something that accesses the files in the same way. I've got an upload form that I can't change and need to find out how to get at these files.
View 3 Replies
May 13, 2010
What is the .Net equivalent of a JSP page?
View 4 Replies
Jan 7, 2011
I am making an Asp.Net application which does the following on the client computer:
Establish a Connection. Check client's cpu usage to see if it is idle or not.If the client is idle it starts executing a c application.While executing the script if client starts doing something (also checked by monitoring his cpu usage) stop signal is sent. Start signal is again sent to the client if he is back to his idle position. If the client is Ubuntu, I use ssh and execute what I want to.What is the way of doing this in Windows without the root access?
View 2 Replies
Jun 1, 2010
Can you let me know the equivalent of C/C++ #define in asp.net?
View 5 Replies
Mar 6, 2011
What is the equivalent to function mid in ASP page?
View 2 Replies
Jun 22, 2010
I'm using a DataReader to display informations stored in a table. I created Two button to go to next record and to go back. In VB6 I used this code :
While Not Recordset1.EOF
Recordset1.MoveNext
End While
In ASP.NET I didn't find a way to do like it, because DataReader hasn't the EOF property.
EDIT :
While Not Recordset1.BOF
Recordset1.MovePrevious
End While
How can I convert this last code (VB6) to ASP.NET?
View 2 Replies
Jun 29, 2010
I have some code I would like to execute very early in the lifecycle of a call to an ASMX function. For our ASPX pages, this code is in the Page_Init() function on a base class, from which all our ASPX pages inherit.
Is there an ASMX equivalent to the ASPX's Page_Init() function?
Better yet, is there an ASMX lifecycle diagram like the ASPX one? http://msdn.microsoft.com/en-us/library/ms178472.aspx
If there is an ASMX equivalent to Page_Init(), I assume I can implement code in a common base class, from which all my ASMX classes can inherit, correct?
View 3 Replies
Mar 15, 2011
I have been using this tag ActionLink().Replace in asp.net mvc 1.0:
<li><%= Html.ActionLink("_place_", "Index", "Home").Replace("_place_", "<div id='homeOff'></div>") %></li>
I upgraded the project to mvc 2.0 and now this .replace() does not work any more. I was looking for equivalent code for this.
View 2 Replies
Mar 15, 2010
I use T4MVC inside my asp mvc projects, mostly because it's brilliant. Is there an equivalent for asp webforms?
View 2 Replies
Jan 19, 2011
Can anybody tell me what the LINQ equivalent of this SQL would be?
[Code]....
But it returns none of the records that are returned by the SQL.
View 1 Replies
Mar 4, 2010
I want to know what is equivalent to Page Error() in MVC which we use to have in simple asp.net, which is called when any invalid character is there in the input string.
I donot want to use [ValidateInput(false)] option for this. which I can handle invalid characters in the input.
View 2 Replies
Dec 17, 2010
I am looking for an alternative of these two functions in asp.net/c#.
if(function_exists('foo'))
{
$returned = foo($bar);
}
if(class_exists('foo'))
{
$fooclass = new foo($bar);
}
View 4 Replies
Apr 1, 2010
We've been using IScriptControl to tie javascript objects to our UserControls and ServerControls, and it's worked fine.The problem is that ASP.NET seems to provide no method to tie a javascript object to a Page. Up to now, we've been putting plain functions in the global namespace, but I am developing a serious allergy to that practice.It'd be easy enough to wrap our functions into a javascript class, and to include the javascript file on the page, but how to instantiate the object, how to reference it from callback events, and how to pass data to it from the code-behind, I haven't figured out.Or rather, the methods we've been using up to now (hidden fields, emitted javascript strings, etc.
View 1 Replies