How To Make Rich / Compound Views

Feb 7, 2010

I have recently started to examine asp.net mvc. I have studied quite a few examples and common to these are that they contain quite simple scenarios, where a view will map to either an instance of a type in the model or a list of a paritcular type from the model.

I'm looking for guidelines to compose/composite views. In the long term I would like Ajax to be part of the equation, but for now I'm looking for a simpler non Ajax setup.

The problem:

Here is a description of a contrieved problem. A domain model contains the types A and B.

class A
{ String ID, String Name, int Age
List<B> ListOfB
}
class B
{ String ID, String Name, String Url}

[Code]....

Since the solution has to allow for different combinations of data and functionality, I think it would be smart to have a parent view (not to be confused with a masterpage) that contained placeholders for parital views. Then, the parent views controller could make up the right combinations of model data and partial views and feed these to the parent view.

Finally; the questions:

Is my way of thinking in accordance with the asp.net mvc methodology? Can you explain/show (not necessarily all of it) how the controller can compile the right combination of partial views and feed these to the parent view?

View 1 Replies


Similar Messages:

Web Forms :: Make All Buttons Visible In TinyMCE Rich Text Editor

Jul 16, 2013

How can I ensure there are proper icons available, like Bold, Italic, Underline, and etc, to the Edit area on the page?

<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="App13._Default" ValidateRequest="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>TinyMCE_Test1</title>
<style type="text/css">

[Code]...

View 1 Replies

Architecture :: Use Separate Pages Or Make One With Multiple Views?

Nov 15, 2010

I'm working on a webforms aspx app (not MVC) and I'm not sure if I should just create separate pages or somehow make multiple views on the same aspx page for the following scenario: Basically, I need to give the user the option to view a set of data a few different ways (essentially different group by's from a data perspective)... the data is always the same, its just a matter of how to arrange on the page...

each way I need to present the data will essentially consist of 2 repeaters, one nested inside the other. The outer repeater will display a nice header section with the nested repeater showing the list of items under that heading. view by book title (title is outer repeater, with the book list being the nested repeater, yes, multiple books with same title for this example - the app has nothing to do with books, this is just to illustrate)

Book Title: A Good Story
Author - Publisher - ISBN
Dan Johnson - Smith Publishing - kjdkjfd99898989
Susan Day - Smith Publishing - aa777fd99ff
Greg Greger - Corp XYZ - amkj897hgrt554

Book Title: Another Good Story
Author - Publisher - ISBN
Frank Franky - Corp XYZ - kj3kjfd9d9980
Jason Cambel - Smith Publishing - 7g7fddddttt
Jill Breker - Smith Publishing - d9ddt523321

Or, view books by publisher (here the publisher would be the outer repeater and the list, with different fields compared to first view, is the nested repeater.

Publisher: Smith Publishing
Title - Author - ISBN
A Good Story - Dan Johnson - kjdkjfd99898989
A Good Story - Susan Day - aa777fd99ff
Another Good Story - Jason Cambel - 7g7fddddttt
Another Good Story - Jill Breker - d9ddt523321

Publisher: Corp XYZ
Title - Author - ISBN
A Good Story - Greg Greger - amkj897hgrt554
Another Good Story - Frank Franky - kj3kjfd9d9980

so what do I do here? Just making separate pages is simple and would work, but is there something else I should be considering? There will be 3 different views, so 3 pages total if I went that route. Something is making me think I should be doing this all within one aspx page? maybe just toggling the visible property of the repeater controls? but then I was thinking each of these repeater controls is databound, and I assume even if they are not visible they still incurred database hits to get the data, right? and that could be bad?

View 4 Replies

MVC :: Compound Primary Keys In DB Design?

Mar 2, 2010

I'm getting up to speed with MVC. In all examples that I find, the database tables always seem to have a single autoincrement column as the key. Is this the standard for DB Design when the intent is to use MVC or can MVC cope with compound primary keys that dont necassarily have autoincrement?

Typical DB Design:

[code]....

It's just that obviously in the real world many companies already have a good DB design populated with data based on the classic design style. If I get clients contemplating updating their applications and want to use the MVC framework, will they also need to consider the redesign of the DB?

If MVC can cope with compound key's are there any good examples. I thought that by using binding exclude/include that compound keys are possible, but it wasn't clear to me.

View 1 Replies

DataSource Controls :: How To Implement Compound From In Linq Using Dbml

Jan 8, 2010

i have some confusion using compund from in linq.I know the concept of compound from but in database table how can we use.can anyone give me example of it.

View 3 Replies

SQL Server :: Calculate A Compound Interest For Each Row Based On The Previous Row?

Sep 12, 2010

I would like to calculate a compound interest for each row based on the previous row.

My table Table1 :

index sum quantity sum_after_interest
1 100 5 500(??)
2 500(??) 2 1000 (??)
3 1000(??) 3 3000 (??)

I marked in question marks the columns that I want to calculate, where I only have the sum for the first row and the quantity for all the rows.

Can this be done using views and inner joins or nested selects ?

View 1 Replies

MVC :: Compound View Model Object Causing Remote Validation Failure?

Feb 12, 2011

I have used a pattern of compound view models for a few of the forms in this project. It works very well.

In this case I have a VendorAddress view model. I use Address(es) in a few places in this project so I made and Address view model object that I can re-use. Then I desided I want to do a very thorough checking of the state codes and zips so, I desided I would try to use remote validation and check the state and zip code aganst a stored set of tables in the database.

The problem is I am not getting values back to the remote action methods for the fields I'm asking for (in this case State and PostalCode). I believe this is because of the name mangleing that the MVC framework does for compound or sub types for id(s) for the inputs in this case it is making names like 'Address_Line1' and 'Address_State' and 'Address_PostalCode'.

Ultimately the question I have is, is there a way of turning off the pre-pended 'Address_' from the base view model object in a way that MVC framework can put it bak into the object after ther post of the form?

[Code]....

Then in the form after rendering it looks like this:

[Code]....

I get the remote call but there is nothing in the parameters "State" and "PostalCode", so the unobtrusive routines are firing but I think it does not know where to look for the data even though I have type something in the mensioned fields. As you can see in the rendered code the id="Address_State" and the data-val-remote-additionalfields="*.State,*.PostalCode"

View 4 Replies

Added 5 Views In The MultiView But All Views Are Tight Together?

Sep 28, 2010

I am learning MultiView control.Here are question:I added 5 views in the MultiView but all views are tight together. I can not drag and drop another control such as text boxes or labels into view area.

View 15 Replies

C# - .NET MVC Partial Views And Routing - Using Ajax Calls To Trigger A New Request But Non Of The Partial Views Are Refreshed

Mar 9, 2010

I have an MVC view that contains a number of partial views. These partial views are populated using partial requests so the controller for the view itself doesn't pass any data to them. Is it possible to reload the data in one of those partial views if an action was triggered in another? For example, one partial view has a jqGrid and I want to refresh the data in another partial view when a user selects a new row in this grid. Is there a code example for this scenario (in C#) that I can look at to see what am I doing wrong? I am using ajax calls to trigger a new request but non of the partial views are refreshed so I am not sure if the issue is with the routing, the controller,

View 1 Replies

MVC :: Rich Large Grid Editing In MVC?

May 25, 2010

I need to create a MVC view with a large grid of data allowing the user to edit the values and then save. By large i mean up to 15000 rows in the grid, much like a spreadsheet. I'm finding this to be extremely slow on the view side and even not responsive when adding javascript to make things a little richer.What methods can you all recommend for tackling such a requirement?

View 7 Replies

How To Set Of Controls That Would Require For Rich UI Development

Mar 5, 2010

We started a new project and the nature of the project is very interactive and a Rich UI is required.

We would need a set of controls that would require for Rich UI development. I found Obout while googling. I never heard about them and never seen fellow members telling me such name except Telerik, ComponentOne, NetAdvantage. These are the famous names we heard but no this one.

But, the controls give a positive feeling. But as two things matter always when you are buying some services: How good are their customer support? and How much feasible their price is?

Another, How quickly they release patches/updates? As, what if we find a bug or an error during development what will gonna happen? Do they provide a quick solution for this? I hope you understand my query. I'm bit confused making a decision here. I need your assistance, experience and feedback.

View 5 Replies

How To Display Rich Text In Tooltip

Jan 5, 2011

i use the following code to display a tooltip

[Code]....

display the following result

however when i edit the text as follows (making it bold and red in another gridview containing rich text editor)

i get the following (as a formatting result in the second grid view)

however when i view in the first gridview to display the tooltip i get the following result display the tooltip as rich text

although many people say that jquery is "very easy", i have really HARD TIME using it and i tried more than 10 times, always failed to make any use of it. i know it is my bad, but if you know other way not jquery

View 3 Replies

MVC :: Rich Text Box With Content Editablediv?

Nov 6, 2010

i want to make a simple rich text box in my asp.net mvc application. where user can change text direction (right to left or left to right). i don't need to post its content so binding it with textarea or input field is not required. user will just put some content in their and it will be processed thourgh ajax calls manually.why i m not using available choices (tinyMce etc.): more complicated than my requirements and i want to show a custom context menu if user clicks on the word in rich text box and make some text replacements.

what i have tried: i have tried using contentEditable div and doing some action in keypress event but content editable div probably not firing the event.

View 1 Replies

Pasting An Image On Rich Text Box?

Feb 2, 2010

I am trying to paste the image on rich text box from clipboard. Below is the code, but I am not sure how will I invoke it from code behind.

Below is the front end code:

[Code]....

View 16 Replies

Free Rich Text Editor Using On Asp.net

Aug 31, 2010

I need Free Rich Text Editor to use on ASP.NET.

View 2 Replies

Web Forms :: Rich Text Editor With Asp.net 2.0

Feb 16, 2010

is there any rich text editor for asp.net 2.0? i think only 3.0+ versions support ajax.

what do i do with 2.0?

View 3 Replies

Is There Any Free Rich Text Box That Can Add A Video From Youtube

Mar 10, 2011

I am searching for a rich text box like the ajax editor, where i can add an image or a video or smiles?

is there any free rich text for this one?

View 3 Replies

Saving And Restoring Rich Text To/from Database?

Feb 17, 2011

I am creating a winform app in C# to store formatted text from a rich text box to MySQL database, which can be retrieved back to the rich text box. The database field is a VARCHAR and my code is something similar to below. But I'm getting "file not in correct format" error. Can anyone tell what could be the problem? Is the VARCHAR field okay to store it or should I change it to a BLOB?

string rtfText = this.richTextBox1.Rtf;
// save rtfText to database field as varchar
// ...
// reload rtfText from database as string
this.richTextBox1.Rtf = rtfText;

View 4 Replies

AJAX :: Rich Text Editor / How To Add It In Project

Mar 22, 2010

have downloded rich text editor Dll.....i have downloded from codeplex.com....i want to include in my project....in this site they wrriten that simply drop it in bin dir.but it not working...how to include it in my project....i also include it in tool box...but its not working...

View 3 Replies

Architecture :: Store Images And Rich Media

Aug 23, 2010

I am working on a project in which I have to store atleast 100000 images and rich media like virtual tour, promotional videos. I would like to know the best practice to store it in order to retrieve it in show it on website. What should I store it as: Store the url into the database and store the actual image on the physical server. Store the image itself as a binary into the sql server itself and then convert it to runtime and show on the website. I need to know which way is the best and suitable way to do this task.

View 6 Replies

Web Forms :: Building A Rich Internet Application In .net?

Sep 11, 2010

Is it possible to develop something like this with asp.net, html and javascript?

http://www.gsk.com/annualreview2009/

i think this website is developed in flash with actionscript.I dont want to use Silverlight or Flash . what are the other options i have?

View 2 Replies

Develop Rich Experience Form Submission?

Jun 12, 2010

If I have a large amount of fields/data on the Form, what's the strategy to organize or break them down within Form? or There
is other approach to develop rich experience form submission.

View 4 Replies

Web Forms :: Contact Us Form With Rich Textbox On C#

May 2, 2012

I am having an issue with the "Contact us form with rich textbox on asp.net c#".  It works good on my local machine but timesout when it is on the server. What to do?

View 1 Replies

Rich Text Editor Field Is Not Saving Information?

Apr 23, 2010

We are using Sitecore.NET 5.3.1 (rev. 071114) and we found out a problem. When we are trying to change information in a Rich Text Editor field on the Master database and save the information, this information is not stored and instead the old information appears back into the RTE field. I have been trying this on the Web database on which this is not happening. However, changing this information on the web database feels useless because a publish will just change every information that does not correspond to the data in the Master database in which i just can't edit this field. So I'm having big trouble at this point since this is for one of our bigger customers and they really want this fixxed asap.

View 1 Replies

SQL Server :: How To Store Rich Text Box Data In 2005

Oct 14, 2010

i am using rich text box controal how to store rich text data in sql 2005

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved