Click here to Skip to main content
15,887,268 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questioncapture and save user id when new record created in asp.net mvc Pin
Member 1115681015-Oct-14 16:25
Member 1115681015-Oct-14 16:25 
AnswerRe: capture and save user id when new record created in asp.net mvc Pin
David Mujica16-Oct-14 3:14
David Mujica16-Oct-14 3:14 
GeneralRe: capture and save user id when new record created in asp.net mvc Pin
Member 1115681016-Oct-14 7:51
Member 1115681016-Oct-14 7:51 
GeneralRe: capture and save user id when new record created in asp.net mvc Pin
David Mujica17-Oct-14 8:36
David Mujica17-Oct-14 8:36 
GeneralRe: capture and save user id when new record created in asp.net mvc Pin
Member 1115681020-Oct-14 5:28
Member 1115681020-Oct-14 5:28 
Questionusing content page controls with external js file ? Pin
jayesh_n14-Oct-14 19:07
jayesh_n14-Oct-14 19:07 
AnswerRe: using content page controls with external js file ? Pin
jkirkerx15-Oct-14 11:08
professionaljkirkerx15-Oct-14 11:08 
QuestionEnableEventValidation="false" OR EnableEventValidation="true" Pin
Saeed Ansarinejad14-Oct-14 8:06
Saeed Ansarinejad14-Oct-14 8:06 
I have a page like this:

ASP.NET
<%@ Page Title="test" Language="C#" MasterPageFile="~/Template.master" CodeFile="Define.aspx.cs" Inherits="JobRecords_Default" EnableEventValidation="false"%>

<script type="text/javascript">
function changeFunc() {
var selectBox = document.getElementById("selectBox");
var selectedValue = selectBox.options[selectBox.selectedIndex].value;
window.location.href = '?s=' + selectedValue;
}
</script>

<form role="form">
<label>Ward:</label>
<select id="selectBox" class="form-control" onchange="changeFunc();" runat="server">
<option value="1">Ward 1</option>
<option value="2">Ward 2</option>
<option value="3">Ward 3</option>
</select>
<asp:Button ID="btnRegister" CssClass="btn btn-lg btn-block btn-success" runat="server" Text="Register" OnClick="btnRegister_Click" ></asp:Button>
</form>


I want to use
Java
changeFunc()
in my selectBox onchange event Smile | :)

If in the first line I set EnableEventValidation to false changeFunc() wont fire and if I set EnableEventValidation to true after clicking the btnRegister I will see below error:

Quote:
Invalid postback or callback argument. Event validation is enabled using <pages enableeventvalidation="true"> 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.


is there any one who can help???
AnswerRe: EnableEventValidation="false" OR EnableEventValidation="true" Pin
Kornfeld Eliyahu Peter14-Oct-14 8:20
professionalKornfeld Eliyahu Peter14-Oct-14 8:20 
GeneralRe: EnableEventValidation="false" OR EnableEventValidation="true" Pin
Saeed Ansarinejad14-Oct-14 8:46
Saeed Ansarinejad14-Oct-14 8:46 
Questionpopup issue for showModalDialog Pin
Archana Gaikwad14-Oct-14 3:26
Archana Gaikwad14-Oct-14 3:26 
Suggestion[Repost] popup issue for showModalDialog Pin
Richard Deeming14-Oct-14 4:02
mveRichard Deeming14-Oct-14 4:02 
QuestionPassing GUID to a function Pin
Huma Ansari13-Oct-14 20:18
Huma Ansari13-Oct-14 20:18 
AnswerRe: Passing GUID to a function Pin
Mycroft Holmes13-Oct-14 20:44
professionalMycroft Holmes13-Oct-14 20:44 
AnswerRe: Passing GUID to a function Pin
Richard Deeming14-Oct-14 1:45
mveRichard Deeming14-Oct-14 1:45 
QuestionMy code is not working while using with updatepanel.The ddl selected item it coming blank whiule printing before using update panel it was coming. Pin
ank065713-Oct-14 19:35
ank065713-Oct-14 19:35 
QuestionIs there a way to capture all the page records in jqgrid when exporting to excel Pin
parkway13-Oct-14 9:15
parkway13-Oct-14 9:15 
AnswerRe: Is there a way to capture all the page records in jqgrid when exporting to excel Pin
devvvy13-Oct-14 9:32
devvvy13-Oct-14 9:32 
QuestionRegarding Self hosting SignalR Application in Win Service Pin
Tridip Bhattacharjee13-Oct-14 5:20
professionalTridip Bhattacharjee13-Oct-14 5:20 
QuestionHow to embed a video in my c# based dot net website which should be compatible in all browsers especially chrome. Pin
Member 1107698013-Oct-14 1:15
Member 1107698013-Oct-14 1:15 
Questionasp.net web service error "Microsoft.Web.Services3.Security.SecurityFault: Header http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for ultimate recipient is required but not present in the message." Pin
rafay ansar12-Oct-14 10:32
rafay ansar12-Oct-14 10:32 
AnswerRe: asp.net web service error "Microsoft.Web.Services3.Security.SecurityFault: Header http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for ultimate recipient is required but not present in the message." Pin
jkirkerx12-Oct-14 11:48
professionaljkirkerx12-Oct-14 11:48 
QuestionHow to use JScript to get mouse position inside image? Pin
Troublesome Tommy10-Oct-14 10:19
Troublesome Tommy10-Oct-14 10:19 
AnswerRe: How to use JScript to get mouse position inside image? Pin
Troublesome Tommy11-Oct-14 6:57
Troublesome Tommy11-Oct-14 6:57 
QuestionSignalR - Jquery response - 304 error Pin
miss78610-Oct-14 4:28
miss78610-Oct-14 4:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.