Purpose Of The PropertySpecified Pattern Used By XML Serialization?

Mar 10, 2010

What is the purpose of the PropertySpecified pattern used by XML Serialization ?

View 1 Replies


Similar Messages:

Pattern For Retrieving Complex Object Graphs With Repository Pattern With Entity Framework

Oct 13, 2010

We have an ASP.NET MVC site that uses Entity Framework abstractions with Repository and UnitOfWork patterns. What I'm wondering is how others have implemented navigation of complex object graphs with these patterns. Let me give an example from one of our controllers:

[code]....

It's a registration process and pretty much everything hangs off the POCO class Person. In this case we're caching the person through the registration process. I've now started implementing the latter part of the registration process which requires access to data deeper in the object graph. Specifically DPA data which hangs off Legal inside Country.

The code above is just mapping out the model information into a simpler format for the ViewModel. My question is do you consider this fairly deep navigation of the graph good practice or would you abstract out the retrieval of the objects further down the graph into repositories?

View 2 Replies

MVC :: AsyncController Gripes / Working Pattern For Converting A GET-POST-GET Pattern To Asny?

Feb 23, 2010

Does anyone have a working pattern for converting a GET-POST-GET pattern to asny?

I'm encountering the following issues:

1. You cannot mix Sync and Async action methods SubmitForm(), SubmitFormAsync(bool? confirm), SubmitFormCompleted() ... (because the resolver gets all confused ... it doesn't use the HTTP verb to decide who to target. BTW: I think that's poor design, or a bug)

2. Renaming the get method name to something else eg: SubmitFormConfirmation(), SubmitFormAsync(bool? confirm), SubmitFormCompleted() would be very awkward if it works ... because you have to doctor the <form markup to specify an action name.

3. You cannot give them all async names SubmitFormAsync(), SubmitFormAsync(bool? confirm), submitFormCompleted(), because the call just keeps malfunctioning. It sometime even behaves as if you are requesting a delete of something.

Can someone give an insight from an actually working sample.

View 5 Replies

Best Design Pattern For Associating Subdomain With Area And PRG Pattern?

Aug 21, 2010

Now that the next version of ASP.NET MVC is being prototyped and previewed (ASP.NET MVC 3 Preview 1 came out a couple of weeks ago), I wonder if we should call the attention of the Core Dev team (S Hanselman, Phil Haack and all) to this "feature."there a easy/non tacky way of associating subdomains &#8594; areas?Something like:
[URL]Also, whats the best accepted design pattern in implementing PRG pattern in ASP.NET MVC? I guess it should also get some official loving in MVC 3.

View 2 Replies

Purpose To Use The Delegates?

Mar 22, 2010

what is the use of delegates. why we use delegates.

View 1 Replies

Trying To Use IIS For Paypal Purpose?

Jul 5, 2010

what i want to do is to get the current ip i have (with a site as, http://whatismyip.com/) and send it to paypal sandbox so i can get a response (of course i haven't started the paypal code but i first need to be able to get a communication from paypal,non?)Ok the problem is that if i start a new web site on IIS, hit the current ip, i get my router administration console as a response.I have tried to change the port on a new site to 81 or 82 or 83 but i get a page not found.

View 11 Replies

Purpose Of EnableEventValidation - Working?

Oct 11, 2010

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" onrowediting="GridView1_RowEditing">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="btnEdit" runat="server" Text="Edit" CommandName="Edit" />
<asp:Label ID="lblFirstColumn" runat="server" Text='<%# Eval("FirstColumn") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblEditMode" runat="server" Text="This is Edit mode"></asp:Label>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.Add("FirstColumn", typeof(int));
dt.Rows.Add(100);
GridView1.DataSource = dt;
if (!IsPostBack)
GridView1.DataBind();
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
GridView1.DataBind();
}

If I change if (!IsPostBack) GridView1.DataBind(); to GridView1.DataBind(); and try to put GridView into Edit mode by clicking btnEdit, then I get the exception: Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. But if I set EnableEventValidation to false, then GridView1 won't enter edit mode ( ie - GridView1_RowEditing doesn't get called ). BTW - same problem also occurs with other databound controls ( DataList, DetailsView ) Page. EnableEventValidation gets or sets a value indicating whether the page validates postback and callback events. When the ableEventValidation property is set to true, ASP.NET validates that a control event originated from the user interface that was rendered by that control. A control registers its events during rendering and then validates the events during postback or callback handling.

a) Why must postback and callback events be evaluated? and how exactly does evaluation happen?
b) Why would calling GridView1.Databind() on each postback cause exception when trying to put it into edit mode?
c) I also don't see any reasons why disabling EnableEventValidation prevents GridView from entering edit mode?! Thus why did.

View 1 Replies

What Is Captcha For Security Purpose

Sep 15, 2010

Can anyone tell me what does CAPTCHA do as far as security issue is concerned?Registration form of many sites have this field but how it works?

View 5 Replies

Web Forms :: What Is Purpose Of Using Masterpages

May 27, 2010

i want to know what is purpose of using masterpage?

View 5 Replies

Purpose Of StringWriter - Usage?

Feb 18, 2010

i would like to know what the StringWriter Class is about and when we should use it.

View 2 Replies

Purpose Of GpState File?

Jan 18, 2010

found a .gpState file in the folder,What is the purpose of gpState file?

View 2 Replies

Purpose And Mechanisms Of The Postback Event?

Jun 14, 2010

purpose and mechanisms of the postback event? I am becoming very confusined when reading and am hoping that someone could explain it to a beginner.

View 17 Replies

Web Forms :: What Is The Purpose Of BrowserFile1.browser And How To Use It

Jun 29, 2010

What is the purpose of BrowserFile1.browser?

How to use it?

View 4 Replies

What Is The Purpose Of Handler (.ashx Files) And What Is The Use

Jan 10, 2011

What is the purpose of Handler (.ashx files) and what is the use ?

can i get any sample ?

View 1 Replies

Web Forms :: Rewrite Url For Security Purpose?

Jan 11, 2011

I have a problem with URL of my application..................

I want to rewrite my url for security purpose......Like....

suppose my application URl is .....http://localhost/MyApplication/Product.aspx

But i want to change this url with......... http://localhost/MyApplication/MyProducts

View 1 Replies

AJAX :: UpdatePanel: What Is The Purpose Of PostBackTrigger

Jul 24, 2010

In documentation I have read:

„Use the PostBackTrigger control to enable controls inside an UpdatePanel to cause a postback instead of performing an asynchronous postback."

I made simple application and I do not see difference between using PostBackTrigger and standard postback.

I have three buttons: two inside update panel and one outside update panel. When I click btnUpdateAsync in event handler I set text property of lblUpdatePanel and lblNoUpdatePanel and only lbl that is inside update panel is chaned if web browswer - so this is ok.

Whant I click btnUpdateInUpdatePanelSync all page is refreshed and both lablels are changed in web browser.

When I click btnUpdateOutsideUpdatePanel I see the same behavior.

If I used button that is not associated with PostBackTrigger I would get the same behavior - so what is the purpose of PostBackTrigger?

This is my app:

[Code]....

protected void Page_Load(object sender, EventArgs e)
{
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
}
protected void btnUpdateAsync_Click(object sender, EventArgs e)
{
lblUpdatePanel.Text = "btnUpdateAsync_Click";
lblNoUpdatePanel.Text = "btnUpdateAsync_Click";
}
protected void btnUpdateInUpdatePanelSync_Click(object sender, EventArgs e)
{
lblUpdatePanel.Text = "btnUpdateInUpdatePanelSync_Click";
lblNoUpdatePanel.Text = "btnUpdateInUpdatePanelSync_Click";
}
protected void btnUpdateOutsideUpdatePanel_Click(object sender, EventArgs e)
{
lblUpdatePanel.Text = "btnUpdateInUpdatePanelSync_Click";
lblNoUpdatePanel.Text = "btnUpdateInUpdatePanelSync_Click";
}

View 2 Replies

How To Use Payment Gateway For Online Shopping Purpose

Sep 1, 2010

i have to implement for online payment getting for donation for a social community

View 1 Replies

Purpose Of Different Order Of Execution: Init() And Load()

Jan 17, 2011

During a recent interview the following question was asked.

- A Master page which contains
- An ASPX web form page which contains
- A Web User Control inside the page which contains
- A button to fire some code in a button_click event

The Init Event will fire (Inner Most to Outer Most)

aspx.page Begin Init
-> Inside user control Page_Init
-> Inside master page Page_Init
-> Inside lifecycle page Page_Init
aspx.page End Init

and Load Event will fire

aspx.page Begin Load
-> Inside lifecycle page Page_Load
-> Inside master page Page_Load
-> Inside user control Page_Load
aspx.page End Load

Why does ASP.NET framework support different execution order in Load() and Init().This was the question asked in interview.I have no idea about what the interviewer expecting from me.

View 1 Replies

DataSource Controls :: Purpose Of ANSI_NULLS ON And QUOTED_IDENTIFIERS ON?

Jun 10, 2010

If you have a very large stored procedure, is it okay to just use the commands just once in the script?
ANSI_NULLS ON and QUOTED_IDENTIFIERS ON?I really don't understand the purpose of these commands?

View 2 Replies

Purpose And Proper Use Of A Textfields Max-length Property?

Feb 24, 2010

What is the purpose and proper use of the max-length property on text fields?

The application I'm working on limits numeric fields to 6 characters... which doesn't work very well for entering millions of dollars... which is why I'm "fixing" it.

View 3 Replies

Serialization In WCF Using JQuery?

Apr 26, 2010

is it possible to use WCF classes with attributes (like [DataMember....) then you wouldnt need to do seralization on the client side (jquery) ?

View 1 Replies

Web Forms :: Purpose Of Action Attribute Of Form Element?

Feb 16, 2011

can anyone make it clear the main purpose of action attribute of form tag in html page?

View 2 Replies

C# - Can Determine If There Is An Open Source Software For A Specific Purpose

Mar 9, 2010

We are going to write an entire new application for a reservation system. In this system experts specify their free time in elaborated calendar and users seek them through searched and finally reserve the expert and his time.

We prefer to find an open source program like this and try to evolve it instead of creating it from scratch. In this manner our time is saved and that open source program will be completer too.

View 5 Replies

Security :: Purpose Of FormAuthentication Coockie In Forms Authentication?

Jan 3, 2011

How server will detect the specific user, by the formsAuthentication cookie.

View 3 Replies

MVC :: Can DataAnnotations Persist Through Serialization

May 24, 2010

I am using business objects that are accessed via webservices. These objects can be loaded via the webservice and serialized to my mvc app. The mvc app can get a web reference to the objects and they can be utilized in the mvc app. However, the business objects are where the classes are defined, and where the annotations are applied.

The mvc validation seems to have no idea that there are System.ComponentModel.DataAnnotations attributes applied to this business object class.

1) Are DataAnnotations lost when objects are serialized / deserialized?

2) If in mvc I use a view model approach, and have nested objects (which themselves have public properties - decorated with DataAnnotations) can/will the mvc validation system traverse the entire object model, the model being used for my view? (so it can see DataAnnotations attributes of the nested object)?

View 1 Replies







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