Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:711943
More Search Options
RSS Available
Matching Posts
Wrong value on update
Hey people, Here is a strange problem. I've created a DD Linq2Sql website. When editing and then updating a row one of the foreign fields is wrong on update and causes an error in SQL. I don't understand where does it take it's value from. The value which is sent through AJAX from the select box is right, but when I put a break point in the update method I could see the value is wrong there. partial void UpdateReadiness_ActivitiesHistory(Readiness_ActivitiesHistory instance) { // here
Posted to
ASP.NET Dynamic Data
(Forum)
by
michaelr524
on 7/1/2009
Re: Wrong value on update
Hey Steve, Can you explain please, I didn't really understand your answer. The original value is loaded automaticly then I edit a row and then I update and get this: Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_Readiness_ActivitiesHistory_Readiness_ActivitiyStatusFactorDef". The conflict occurred in database "ReportsEden", table "dbo.Readiness_ActivitiyStatusFactorDef"
Posted to
ASP.NET Dynamic Data
(Forum)
by
michaelr524
on 7/1/2009
Re: Disable "Required" validation on Not Null fields
Hey! Thanks. It's working. I have extended the data context Insert method and check there for null values, converting them to String.Empty's. Only problem now is that the new record doesn't show in the database... I'll try to debug it now.. Michael
Posted to
ASP.NET Dynamic Data
(Forum)
by
michaelr524
on 12/17/2008
Re: Disable "Required" validation on Not Null fields
I am having trouble disabling the RequiredFieldValidator control in the field template. Not calling SetUpValidator(RequiredFieldValidator1); and setting RequiredFieldValidator1.Enabled = false; removes the validation only from client side but not from server side, so I get the same error messages but this time via AJAX. What is the right way to disable the RequiredFieldValidator1 control in the field templates? (I am using the custom attribute solution) Thanks Michael
Posted to
ASP.NET Dynamic Data
(Forum)
by
michaelr524
on 12/16/2008
Re: Disable "Required" validation on Not Null fields
NVarChar(50) NOT NULL
Posted to
ASP.NET Dynamic Data
(Forum)
by
michaelr524
on 12/16/2008
Re: Disable "Required" validation on Not Null fields
Hey! I am using LINQ to SQL. Marked the fields as Auto Generated Value and annotated with ScaffoldColumn(true), they get scaffolded but in the insert page there is no input element for those fields, just their name and an empty space. Thanks Michael
Posted to
ASP.NET Dynamic Data
(Forum)
by
michaelr524
on 12/16/2008
Re: Disable "Required" validation on Not Null fields
Well, I want to leave the user an option to leave the field empty. An empty field submited, in the database would become an empty string for varchar fields or 0 for int fields...
Posted to
ASP.NET Dynamic Data
(Forum)
by
michaelr524
on 12/16/2008
Re: Disable "Required" validation on Not Null fields
Hey! Great solution. That's what I did: [AttributeUsage(AttributeTargets.Property| AttributeTargets.Field, AllowMultiple= false )] public class NotRequiredAttribute : System.Attribute { public override object TypeId { get { return this ; } } public NotRequiredAttribute( bool value ) { this ._value = value ; } private bool _value; public bool Value { get { return this ._value; } } } And this in the template code behind: var noReqValidAttribute = Column.Attributes[ typeof (NotRequiredAttribute
Posted to
ASP.NET Dynamic Data
(Forum)
by
michaelr524
on 12/16/2008
Re: Disable "Required" validation on Not Null fields
I don't want to hide the fields, but rather allow the user to submit the insert form with empty fields. By default I get "Required" validation errors on all empty fields.
Posted to
ASP.NET Dynamic Data
(Forum)
by
michaelr524
on 12/16/2008
Disable "Required" validation on Not Null fields
Hey People! What's the right way to disable "Required" validation on Not Null fields of scaffolded table? Changing the table definition in the database is not an option. Thanks
Posted to
ASP.NET Dynamic Data
(Forum)
by
michaelr524
on 12/16/2008
Page 1 of 2 (20 items) 1
2
Next >
WindowsClient:
ASP.NET AJAX 4.0 Data Binding on MSDN Magazine
WindowsClient:
Don’t miss out..
TechNet Edge:
Improving Collaboration with SharePoint - Tech Focus December 2009 Part 1
Channel 9:
Channel 9 Live at PDC09: Scott Guthrie
Channel 10:
Get Discounted Concert Tickets at the New Windows Section 7
Channel 10:
Get Bing Wallpapers on the iPhone
Channel 10:
Bing Gets a New Toolbar
ASP.NET:
More on medium trust: what permission are you missing?
Channel 9:
Channel 9 Live at PDC09: Bob Muglia
WindowsClient:
Adventures With Windows Azure Diagnostics
Mix Online:
Adventures With Windows Azure Diagnostics
Channel 9:
Channel 9 Live at PDC09: Ray Ozzie
Channel 9:
Coding4Fun: DrinkTendr
Channel 9:
TWC9: Scott Hanselman, John Galloway, Bing, parallel unit tests, more
TechNet Edge:
ISA to TMG Migration Guidance
Channel 9:
Life at Microsoft: Episode 3
TechNet Edge:
Microsoft Windows Server 2008 to AITP
ASP.NET:
How important is medium trust to you?
WindowsClient:
Microsoft Web Platform & You
WindowsClient:
New Book: Developing for Microsoft Surface
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online