As a high-school student [that pretty much has C# knowledge of a first degree] - I got an assignment for the Israelish 'Bagrut' exams [which are the final, most important exams in high-school] - before we actually went through the materiel in-class [about 3 years earlier.]
It was to make a simple dynamic website, maybe a basic social website or an online-store, with importance of server-side ASP.NET.
My teacher gave me a book from 2006 called 'ASP.NET & XML Web Services' - and I've started learning.
The problem is, I have VS2010 Ultimate with .NET FW 4 installed, and apparently, is majorly different from the C# Express that the book author has.
On my VS, the Design Editor of the HTML is not allowing me to have the WinForms level of freedom, but makes me write the CSS myself, not show me the common XY based designer, but something like a blog WYSIWYG - without the freedom of moving stuff around.
As I do not want to work too hard converting the book instructions to my VS, I would like to know if its possible to get the [probably obsolete] WinForms - WebForms designer - and not by downloading a very old version of VS.
I've tried playing around a bit with VS, and found out that the book used System.Web.UI.Page, while my VS uses System.Web.UI.HtmlControls.HtmlForm - even manually changing to UI.Page did nothing to the designer.
Is it possible to 'go back' to the WinForm type of designer? Thank you!
No, it's not possible to do what you want. You are referring to the ugly, terrible, thing-that-should-have-never-been-created-in-the-first-place grid layout thing that Visual Studio 2003 used to have. Learn a bit of HTML. Tables are easy enough to learn and lay out things properly on your markup.
Designing webforms is much different than designing winforms, as the designer uses HTML for the markup. There's really no way to change that, but there should be a design view that allows you to drag and drop, and move things around similarly to how you would a windows form.
As for the design aspect of your site, there is probably no way to escape CSS. The design view should help you with the layout, but most of the styling and aesthetics will have to do be done in CSS.
Page shown in design view
Toolbox
View (Design/Split/Source)
Solution Explorer
Properties Window
Run (F5)
Umm, I'm no web developer and I have no real opinion about whether WebForms is really as evil as Icarus says, but I'm going to have to just throw out there as an alternate answer to his - don't learn to lay out your HTML using tables - HTML tables are for tabular data. Learn to layout your HTML using <span> and <div>, because that is the correct and standards-compliant way to do it. Also because every time you use tables for layout, a skinny-jeans-and-thick-rimmed-glasses wearing hipster dies somewhere, and we need them and their creativity.
You can switch between Content (where you can move your 'stuff') and Code in the HTML Designer, but the point is that VS2010 (be it Express or Ultimate) is for professional development and if you are unwilling to get to know HTML and CSS, there is not point in using it.
You'd be better using other tools like Adobe Dreamweaver or free tools like Amaya
Update: Try WebMatrix
Related
Is there any tool which allows designing a web app visually (drag and drop controls to design page similar to WinForms) for visual studio or any is there any other web app building platform with such feature?
I know that drag and drop is not the best way to design an app, I know this and I am not here to debate you on this. I just need to create one web app, it will be the first and last one so I don't want to learn xaml,css,html ...etc
if there is any tool or plugin for visual studio that will help, I will appreciate it if you tell me about it.
Yes, you can do this.
In fact, when asp.net + web development came out?
99% of developers had worked on desktop software.
99% of developers had used a visual form designer
(FoxPro, ms-access, VB6, vb.net)
So, this visual design approach? (desktop)
Lets drop a button + text box on a form
Drag a button from toolbox on to form. Click on button, add event code.
We have this desinger:
double click on the button, and put in say this code:
private void button1_Click(object sender, EventArgs e)
{
string s = "";
int i;
for (i = 1; i <= 10; i++)
{
if (s != "") { s += System.Environment.NewLine; }
s += i;
}
TextBox1.Text = s;
}
And we get this:
The WHOLE COMBINED software industry worked this way FROM DAY ONE WHEN the graphical user interface was born for computers.
So, now lets do the same in asp.net web forms.
we create a new web page, and I have this visual designer:
Now, double click on the button, and we have the SAME code as before.
(as above).
Note how there was no HTML markup, and just good old fashioned drag + drop.
The output is this when run:
Was that easy or what!!!
So, Microsoft made a great choice. They realized that if they could not provide this REALLY easy to use development paradigm for asp.net? Then EVERYONE would have dropped .net - since the WHOLE reason and WHOLE success of the Microsoft development tools work this way.
So, if Microsoft was going to save .net, and not have everyone drop it - say for ALL THE OTHER web systems appearing?
They had to offer and build a transition type of software.
And THAT IS EXACLTY what they did.
So, back then, the first renditions of web development EXACTLY followed this desktop approach. This is what we call a "transitional" technology choice.
(you do this to SAVE the product and ALL OF the developers that ALWAYS worked that way)
If you create a asp.net web application, then you can choose to create what is called a web-forms application. The WHOLE IDEA of this choice is to with GREAT EASE pull developers from the desktop system to the web based system.
So ZERO surprise you are asking for this kind of development system, since EVERY SINGLE DEVELOPER SYSTEM prior to the web worked that way (at least for high developer productivity, and ease of development you worked that way!!!).
Now, of course that was close to 20 years ago, and since now EVERY new developer NOW starts out with web tools and DOES NOT come from desktop development? Well, they have now DROPPED the web forms designer. (this is beyond sad - but is a reflection of the industry NOW - NOT back then!).
So what then do developers do?
Well, they KEEP a web page open, make changes to the mark-up, hit ctrl-s to save, and then flip over to the browser and hit f5 (to refresh). So developers don't miss (much) the web forms designer and GUI. So, developers thus don't miss the GUI web forms designer much these days.
The other problem? With web standards changing VERY fast, then Microsoft could not keep up with web browsers - and thus that BUILT IN web designer often can't render the page all that well. I still love it - it gets you basic layout, but with new things like css style sheets etc, the the web form designer often does not do all that great of a job. So MS quite much has moved towards you HAVING to use the browser to get correct layout rendering. It was just not possible to "include" a great (perfect) web designer inside of Visual Studio due to the rapid change in Browser technology.
And as noted EVERYONE ELSE in the web development landscape just keeps a browser open and running during development - so the web form designer not all the rage right now.
But, back when asp.net came out? EVERYONE was from desktop, and EVERYONE was working with drag and drop software design. So asp.net ALSO started out this way.
Now, while choosing to create a asp.net web forms project? It is quite old, and is quite legacy right now. But, ironically, a truckload of existing sites were built that way. And the cost of building MVC web applications is VERY high - close to double that of asp.net web forms.
(thus, you can actually find a lot of work for asp.net webform applications).
So you can STILL choose web forms - they are great way to get into asp.net development REALLY fast, and with a MUCH shorter learning curve.
Asp.net web forms are still supported well - but they are "last generation" and considered "legacy" right now. But for a small project to get up and running? webforms are STILL a good choice, and you STILL get that wonderful drag + drop designer!!!
In fact the FIRST version of this site (Stack Overflow) was made with asp.net web forms, but they switched over to MVC for the first release. (and in fact that first version was vb.net!!!).
So MVC (without that wonderfull web layout desiner) is better for large proejcts - say the next FaceBook, or StackOverflow.
But, a typical small business site? Gee, even with 50 users or 100 - it just don't matter performance wise.
The other good reason to choose MVC projects? Well, now we see the rise of what is called Blazer - and that is a REALLY big deal. And you can't choose to use Blazer technology with asp.net web forms. So there are even more reasons to drop the web forms designer.
In the longer run? Without question, MVC is the road and path forward. But, to get something up and running - and with great ease? Web forms is a great choice. Once you get up to speed, then over time, you can make the jump to MVC web projects.
So?
Yes, you can choose to have a drag and drop visual designer for web development, but you be choosing a "older" style technology choice in return for that easy approach.
I don't recommend this choice for longer term, but it can get you up and running if you come from a long time desktop enviroment.
First of all, The answer is YES, HOWEVER, this is not possible through Visual Studio,
there are several ON-LINE websites such as:
Visual Composer
Page Cloud
These websites are not as flexible as a human-made build, and may even cost money.
PS. I Personally do not recommend using these Websites, Instead get someone on fiverr to build a website for you within a gauranteed time period.
I want to make an application WPF C# where i can make questions and drag drop picture and then save it. And then when i hit the save button it Makes an new application. Is this impossible? Does someone have an good url i can visit about this? I can't find anything when google it.
There already exists such an application - it's called Visual Studio. :-)
Joking aside, to answer your question, yes, it is definitely possible to build such an application. There would be numerous ways of doing it, depending on specifics.
One aspect of such an application, let's call it AppBuilder, would be to generate and compile code for the target application. It could be done, for example, using Roslyn, the C# compiler accessible from C#.
Another aspect would be to allow the user to specify the questions, as you describe, and to allow the user to place images. Overall this would require something like a design surface with tools to manipulate the placement of the images and words, not unlike the WPF designer in Visual Studio.
While the user builds the application, there has to be a way of them to save their work, to be able to come back to it later. Does every Save generate and compile the target application? Probably not. So there is a need for a persistence mechanism, and a database, or structured file of some sort, to save the user's work in a form that can later be read back and the project reconstituted in memory.
Those are just the three most obvious features that such AppBuilder would need to support. Now for a reality check: it would not be simple, and depending on your specific requirements, it could get quite complicated. What about debugging the generated application? What about styling? Etc., etc.
I don't mean to discourage you, but maybe you can provide more information about what exactly you want to accomplish, and then we could discuss more.
I'm newbie for Windows phone 7 development.
Usually the User interface Design is done with a Designer and Drag & Drop. But In my project I have to code all user interface programmatically, that is manually write design controls in .Cs file instead of .xaml file.
Is it possible? I have tried googling it, I haven't found any tutorial or documentation yet.
Could someone please help me to start my process.refer some documentation or books
Thanks
I definitely think you can do everything without XAML if you want to.
The basic approach should be to create a basic app with App.xaml and an almost empty Page.xaml. After this you should be able to dynamically add controls to meet your needs.
The majority of this work is quite straight-forward
creating controls, setting properties, adding event handlers are all easy.
The more awkward things will be things like producing animations, visual states, styles and databindings - the XAML syntax for these is quite convenient compared to the C#
Also, if you need multiple pages, then using navigation is also a bit more awkward - the NavigationService is currently built around XAML-based pages.
In iron7, I've written lots of single page apps without using XAML. All the code is in IronRuby rather than C#. As a developer, I think you should be able to follow most of them - take a look at these examples on script.iron7.com:
create a UI with some text boxes and some buttons
a calculator with animations
fingerpaint - canvas and "mouse" touch
panorama control and pivot control
Tetris
To run these scripts just download iron7free from the marketplace. To convert them back into C# is mainly a case of removing some "_" characters, modifying some capitalization and turning def's into C# methods.
Note - for clarification, I am not recommending you write your app in Ruby - it's just that these are the only examples I have of writing an app in code instead of XAML.
You have to create a basic xaml page first with at least a stack panel on it.
Then you can add controls to your stack panel like this
TextBox textbox = new Textbox();
textbox.Text = "TEST";
PageStackPanel.Children.Add(textBox);
You do have drag and drop ability for the Windows Phone 7 development. Download the Visual Studio for Windows Phone 7 and try the samples. http://www.microsoft.com/express/Phone/
Here is a tutorial for the starters:
http://blogs.msdn.com/b/somasegar/archive/2010/03/15/introducing-windows-phone-7-development-tools.aspx
Well its the Silverlight framework. You can code it by hand using XAML (eXtensible Application Markup Language)
Charles Petzold is writing a book on Windows Phone 7 programming, you can download it free here:
http://www.charlespetzold.com/
Generally I don't like the designer and try to avoid it as much as possible. I find writing Xaml easier.
But I also try to avoid the use of Xaml because:
Performance: the C# code is definitely faster
Programming style: I hate when the related code is scattered over several files. It's not only my C# code, but also hidden auto-generated code (sometimes containing unnecessary constructs).
Debugging: Xaml allows for more bugs (e.g. incorrect spelling), Xaml bugs are more difficult to localize
Having said that, I have to disagree with Stuart: Certain things cannot be done in C#, you need to do them in Xaml. For example:
Visual states: You cannot set readonly property VisualStateGroup.Name in C#, but you can use x:Name attribute in Xaml.
UserControl.Content is protected (for SVL3 and thus also for WP7), but Xaml bypasses this limitation
Etc. (There are more such special things.)
I'm trying to learn how to make databases, using C# as the "master language". I've installed Microsoft Visual C# 2010 Express, created an application, etc. There's a bit of a problem though. The form on the GUI developer doesn't look normal. Usually on these things you'll see dots evenly-spaced all across the form. Also when you drag, let's say, labels on to the thing, it's pretty easy to gather exactly how big they are in both dimensions in most other IDEs. Lastly between the dots and the ease of visibility - and control - of the sizing of labels, you can usally line labels, textboxes, and other stuff up pretty easily.
In this IDE that's not quite the case. They've taken away the "coordinate dots", they've made the positioning of everything much more precise, you can't clearly see how big a label is after you put it down, etc. My question is this: How, if possible, could I switch the thing to the more traditional style in those regards?
I know my wording on this may be hard to follow. I don't know the exact terminology of some of this stuff.
Thanks!
In Visual Studio 2010 Professional, you can switch to grid mode instead of lines mode from the Options dialog box, by selecting Windows Forms Designer then setting the LayoutMode option to SnapToGrid.
Can you try that in Express?
I think you are writing off the IDE far too quickly - all this functionality is available in pro but can't vouch for express; perhaps you should try adding a bunch of controls to a form and dragging them round holding keys like [ctrl] - you will probably find most of what you need is right under your fingertips it just different to other IDEs
Like Frederic suggests the options panel contains some settings for the designer. Also ShowGrid can help with visual cues.
However I recommend using a LayoutManager like the TableLayoutPanel or FlowLayoutPanel and using the docking/anchoring techniques which eliminate boring pixel perfection problems you'll get by doing the alignments yourself. I am of course assuming you're doing a "normal" winforms Form here...
Have a look at this MSDN article: http://msdn.microsoft.com/en-us/library/ms171689.aspx
I have a pretty big web application that I created last year using ASP.NET webforms. It has two parts: Admin and Client (each one a project inside a single solution). Admin logs in as you would expect and manages the clients. Clients log in and manage themselves. SQL Server back end. It relies heavily on MasterPages and LINQ. It has 2 class libraries, one for my methods (authentication, security, encryption, etc.) and another with dbml files for linq that both admin and client project reference.
Now I really want to convert this to MVC 2. I know I'll have to rewrite the front end (not a problem, looking forward to it). I can reference my current class libraries and modify them as I need. My main concerns are my forms and controls. I'd really like to stay away from the major asp controls and use jquery for everything if possible (especially the presentation layer. I'm just not sure how to go about doing this. I was also told jquery is great for 'parsing and updating the DOM' but I've never done this either and not sure where to start (why do this over LINQ?).
Another issue I struggled with was the size of my main table. It has 109 fields in it, and my customer thinks all of them need to be available on screen (or as many as possible, especially in the grid). I had to break up my entry/edit form into 5 tabs (all web controls). My grids have sorting, grouping, export to excel, etc... I would really like to find a grid that lets you inline edit individual cells when double clicked. Would it be better to use jquery for grids? I can break that large table into relational tables if needed (probably will do that anyway).
Any advice from anyone who's done similar will be greatly appreciated. I just bought the book "Pro ASP.NET MVC 2 Framework, Second Edition" and I have a great jQuery ebook I'm working with.
Thank you guys!
EDIT: Should have mentioned I used Telerik WebControls for my previous web forms project so I'm familiar with them. I had no idea their MVC suite was free (I've paid quite a bit for the webform controls).
For grids I can recommend the free Telerik mvc controls. They have good support for ajax binding paging, sort, edit, parent-child etc.
This combined with a few widgets from jQuery ui (tabs, dialog) should put you on the right track as far as your presentation layer is concerned.
Adding to RedSquare, the Telerik Extensions for ASP.NET MVC are free and open source (under GPLv2). That essentially means the Extensions for free for "free" projects (projects you're not trying to sell). If you're trying to sell and make money from your software, we have a commercial license, too, to support that.
Today, the Extensions for MVC include 8 extensions: Grid, Calendar, DatePicker, Menu, NumericTextBox, PanelBar, TabStrip, and TreeView.
Additionally, 3 new Extensions are available in beta: Editor, ComboBox, and Window. (Official release towards the end of August.)
The goal of the Extensions is to make it easier to build rich MVC Views, similar to what you've done in the past in WebForms. MVC is very different than WebForms, though, so be careful when making the transition to avoid the "traps" of thinking in WebForms mode. For example, there are no PostBacks or ViewState in MVC, so some things require more deliberate code in MVC.
Finally, as a word of caution for "pure" JavaScript components, remember that they do not support any scenario where JavaScript is disable or not executed (common examples: web crawlers, accessible browsers). If accessibility or SEO are concerns, Server + Client UI controls like the Telerik Extensions can be a bonus.
Hope that helps.