Click here to Skip to main content
15,918,193 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionPublic Enum with strings Pin
byka17-Oct-14 5:59
byka17-Oct-14 5:59 
AnswerRe: Public Enum with strings Pin
ZurdoDev17-Oct-14 8:45
professionalZurdoDev17-Oct-14 8:45 
GeneralRe: Public Enum with strings Pin
byka17-Oct-14 9:46
byka17-Oct-14 9:46 
AnswerRe: Public Enum with strings Pin
ZurdoDev17-Oct-14 10:24
professionalZurdoDev17-Oct-14 10:24 
GeneralRe: Public Enum with strings Pin
byka17-Oct-14 10:27
byka17-Oct-14 10:27 
AnswerRe: Public Enum with strings Pin
ZurdoDev17-Oct-14 10:28
professionalZurdoDev17-Oct-14 10:28 
GeneralRe: Public Enum with strings Pin
RichardGrimmer30-Oct-14 5:10
RichardGrimmer30-Oct-14 5:10 
GeneralRe: Public Enum with strings Pin
ZurdoDev30-Oct-14 5:16
professionalZurdoDev30-Oct-14 5:16 
QuestionHow to develop Notifications feature Pin
JeevanJ15-Oct-14 23:19
JeevanJ15-Oct-14 23:19 
AnswerRe: How to develop Notifications feature Pin
ZurdoDev16-Oct-14 7:57
professionalZurdoDev16-Oct-14 7:57 
GeneralRe: How to develop Notifications feature Pin
JeevanJ16-Oct-14 19:20
JeevanJ16-Oct-14 19:20 
AnswerRe: How to develop Notifications feature Pin
ZurdoDev17-Oct-14 1:31
professionalZurdoDev17-Oct-14 1:31 
GeneralRe: How to develop Notifications feature Pin
JeevanJ17-Oct-14 8:13
JeevanJ17-Oct-14 8:13 
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 

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.