I am using Asp.net Web Forms , earlier I used this jqGrid sample which is not free , this I realized later , now that the confusion was cleared , I will now have to use jqGrid open source thing as I wont opt for commercial one , Can anyone point me to links for getting started with jqGrid and Asp.Net Web Forms , it would be really great if someone gives an example which will show free columns from a sample table in jqGrid , I found some articles online , but couldnot understand how it works.
Any suggestions are welcome.
Thanks.
I think that working Visual Studio demo projects could help you mostly.
The demo from the answer uses ASHX handler in ASP.NET Web Form application. It uses only free open source package jqGrid which consist from JavaScript code only. The latest version of the source code you can download from github.
Another demo from the answer uses ASHX handler in ASP.NET Web Form application too. It shows how to implement editing of the grid.
I think having both of the demo project you can create application which uses full set of jqGrid features. Moreover the usage of ASHX handler in ASP.NET Web Form define only the way how the client communicate with the server. So you can use any technology which you prefer for the Database access. So You can use either Entity Framework or LINQ to SQL or even more old, but in many cases the best from the performance point of view SqlCommand with SqlDataReader.
It's important to understand that you can get the most part from the code examples created for another technology like ASP.NET MVC (see the example, another one, this one or this one). So you can implement Autocomplete, Export to Excel etc features in the ASHX handler in ASP.NET Web Form solution.
Related
I am a PHP web developer. Now I want to work with ASP.NET but it's very difficult for me to work with databases in ASP.NET. I need some source link from where I can easily learn ASP.NET.
A good start is the homepage of ASP.NET:
http://www.asp.net/.
It includes a section on how to work with Entity Framework which is an object relation mapper for SQL Server databases.
For WebForms there's a nice tutorial here.
Please follow the template for asking questions.
Since you have asked , ASP.NET has flexible options of connecting/working with databases or you can write code using ADO.NET classes as well. I believe below links will provide a better understanding of working with databases in asp.net.
w3schools - ASP.NET working with database
MSDN
if you search you will find lot of sources over the web,but i recommend you to start with some basic topics , below are some topics with which you should start with :
.Net Framework basics
ASP.Net Page life Cycle
Viewstate
Data Controls
ADO.Net
Basic CRUD Operations on ASP.net Pages(CRUD =
Create,Retrieve,Update,Delete)
Caching in Asp.net
Cookies Management
in Addition C# & VB are most often used languages with .Net Framework , you Can start with C# basics.
below is the link that will give you basic walkthrough
Basic ASP.NET Walkthroughs
We have a large web based application that is built on ASP.Net MVC. We also have a public website that is just HTML/Javascript except for a couple places where we need to submit some information for back end processing. Case # 1 is a simple contact form submission. If that was the extent of it, I'd just process the from via PHP and be done. Case #2, however is more complicated. I need to save data to a database, run a Crystal Report, export the report as a PDF, email the PDF, and send results back to the browser. I already have the ability to do all these tasks on the ASP.Net MVC application. So here's my question. How do I leverage the code I already have in .Net MVC my web app from my public HTML/Javascript site?
I do not want to use ASP.Net MVC on the public site because I don't want to change the routing of the public website.
I have identified two possibilities so far:
1) Submit to a webforms ASPX page. The downside of this approach is that the Web Forms way of doing things creates extra files that I don't need such as designer files, plus I have to consider things like viewstate and postback.
2) Create a Web Service. I don't really know a lot about this, but I have done a little research. If I go this route do I use WCF Service or a Web Service? What are the pros and cons of using this method over the above listed method of submitting to an ASPX page? Is a webservice overkill for what I am trying to do?
Are there other alternatives besides what I have thought of?
Note: I am only interested in the server side aspect of this. I already know I will be using JQuery and AJAX to submit the post and receive back the results. Also business logic is already in a seprate project so that is not a concern either.
I know in ASP.NET MVC you can have mobile views and do things like Index.mobile.cshtml and _Layout.mobile.cshtml and the server knows to serve these views/pages to mobile devices rather than Index.cshtml and _Layout.cshtml, but can this also be done in plain ASP.NET websites (not using MVC)?
Note : I am using razor syntax in the plain ASP.NET website.
Thanks in advance.
-- Lee
UPDATE :
To clarify, I am aware of the various browser detection methods. My question is specifically about whether mobile views in the form Index.mobile.cshtml are available in plain ASP.NET.
UPDATE (Functionality now included in ASP.NET latest release announced 18th February 2013) :
Talk of the devil.. this is now possible in a recent release..
Scroll down the page to the heading 'ASP.NET Web Forms Enhancements'
http://weblogs.asp.net/scottgu/archive/2013/02/18/announcing-release-of-asp-net-and-web-tools-2012-2-update.aspx
Take a look at this, brief description of mobile support for ASP.NET Web Forms:
How To: Add Mobile Pages to Your ASP.NET Web Forms / MVC Application
My understanding is that the alternate view modes support native to MVC4 is a result of the WebPages2 used by MVC, and is currently only used within MVC to resolve locating Views via the View Engine (combination of VirtualPathProvider and DisplayModeProvider). This is because views served up via MVC and requests via the URI do not map to physical locations on the server to serve up files from. ASP.NET on the other hand serves up files directly based off of the URI, and does not depend on a virtual path provider the way MVC does.
My guess would be that ASP.NET does not support automatically serving up alternate files based off of the same framework that MVC uses. That being said, I'm sure it would be possible to derive an implementation based off of the of the logic of VirtualPathProviderViewEngine that could achieve a similar result with ASP.NET, however I know of no implementation that does this currently. Best suggestion would be to see if you can find usages of DisplayModeProvider and see if anything pops up.
I'm not an expert so feel free keep looking but I thought I would offer what I can.
So I have come to the conclusion that this is not built in functionality in plain ASP.NET.
Though there are (IMO less elegant) alternatives.
Are ASP.NET mobile views only for ASP.NET MVC? Yes.
Update : This may be possible in latest release
http://weblogs.asp.net/scottgu/archive/2013/02/18/announcing-release-of-asp-net-and-web-tools-2012-2-update.aspx
-- Lee
I have an existing solution in VS2010. When I click the properties of my project I get the view as can be seen in image1.png:
When I create a new empty ASP.NET web application and click the properties of my project I get the view as can be seen in image2.png:
A huge difference.
Now I'm implementing this code here: http://wcf.codeplex.com/wikipage?title=Getting%20started:%20Building%20a%20simple%20web%20api
And that tutorial assumes I get a view as I've shown you in image2.png
In image1 and image2 I've also marked the menu items: "Website" and "Project"
This makes me assume that I've created a website application whereas I need something different (I'm thinking a web application project).
Not sure what to do now, I need to convert my current application to another thing, but to which type and how to do it?
I also came accoss this post: http://blogs.msdn.com/b/webdevtools/archive/2009/10/29/converting-a-web-site-project-to-a-web-application-project.aspx
But before I start screwing up everything :P Is that what would solve my problem?
It should be possible to use either a web site or a web application project. In the example on the link you've posted, they use the predefined template for ASP.Net MVC Web Applications. This has several advantages - it sets up the structure and other resources for you - it's effectively a template.
For the purposes of the tutorial, why don't you just set up an application that way? If you've already written some code, you can just import it into the new application.
For future projects, you might want to consider which is best for your needs. Apart from structure, there are some other key differences between a web application and a web site project.
MSDN handily provides the differences here:
http://msdn.microsoft.com/en-us/library/dd547590.aspx
If you find you want the features of the web application, then the link you've posted is fine. You'll need to do some re-organizing of your references and so on and so forth, but the process is fairly straightforward (but not painless).
A "web site" in visual studio is the old, .net 1 style of creating web sites. It basically dynamically compiles the code in a folder when it's hit for the first time. Later .NET introduced a "web application" model where the code is compiled into a DLL and no code files are deployed with the site. "Web sites" are pretty much depcrated and shouldn't be used for any new projects unless you're doing a quick demo site.
The codeplex project you referenced also depends on MVC 3 (which are web applications).
You are probably better off just restarting like the tutorial says - create a new MVC application like it shows in its first screenshot.
If you do not have that option, use Web Platform Installer to add MVC for you - http://www.microsoft.com/web/downloads/platform.aspx
Good luck!
I can't tell exactly what's going on from your screenshots, but if you have a web site that you need to convert to a web application project, you can find the directions here
Although the instructions are specific to VS2005, they are basically the same for 2010 as well.
I have been building a Web Application (ASP.NET, .NET Framework 4, VB, visual studio 2010). To be very brief the application interacts with a database and performs several actions (Insert Delete Select etc..).
I am using several Gridviews, ListBoxes etc and I am not happy with the presentation outcome and the functionality provided by asp.net. In simple words my application looks bad, outdated and unprofessional.
I figured that using Windows Forms that will be incorporated to the ASP app would be a great improvement and solve all of my problems.
I have created a Windows Form Control Library to use the dll created in my app as a user control. I found out that this is not supported in .NET Framework 4 (is this true? or am i doing something wrong?).
Is there any way to make my application have the 'look and feel' of a windows application?
Please note that it is has to be a web app and the clients should not have to download any other application to interact with the server.
Have you checked out the third party controls from other vendors?
I currently use them for rapid development.
http://www.telerik.com/
http://www.infragistics.com/
http://www.devexpress.com/
Anyhow all controls in .net you can change there look and feel using plain CSS.
Try using Silverlight 4, it has all that you need. What u are trying to do is traditional ASP.NET and that's as good as it can get coz its all server side code, but with Silverlight things are totally different, its all client side with specific server interactions. Have a look at the tutorials about how to use Silverlight and WCF RIA services to do what you are trying to do.
Try this link: WCF RIA services and Silverlight
Edit: Silverlight is designed to create stunning web GUIs. Just in case you were wondering what the heck it is.. :)