|
Well ...,
ctl00$ContentPlaceHolder1$txtValue in a name of an existing TextBox in the Page ,so this request will cause an exception of type ArgumentException in the function ClientScriptManager.ValidateEvent() ( the stack trace below )
[ArgumentException: 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.]
System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +173
System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +69
System.Web.UI.WebControls.TextBox.LoadPostData(String postDataKey, NameValueCollection postCollection) +34
System.Web.UI.WebControls.TextBox.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +14
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +343
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743
We can avoid that by setting the property Page.EnableEventValidation to false.
Help people,so poeple can help you.
|
|
|
|
|
Ali Al Omairi(Abu AlHassan) wrote: We can avoid that by setting...
Yes, and you can avoid having money by posting your bank account numbers online.
EnableEventValidation is there for a reason. Just because you can do something doesn't mean it is the correct choice.
No comment
|
|
|
|
|
Good Day
i have a shared function as called in vb.net or static function in C# that is declared like this
Public Shared Function runjQueryCode(ByVal jsCodetoRun As String, ByVal Page As Page)
Dim requestSM As ScriptManager = ScriptManager.GetCurrent(Page)
If requestSM IsNot Nothing AndAlso requestSM.IsInAsyncPostBack Then
ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), Guid.NewGuid().ToString(), getjQueryCode(jsCodetoRun), True)
Else
Page.ClientScript.RegisterClientScriptBlock(GetType(Page), Guid.NewGuid().ToString(), getjQueryCode(jsCodetoRun), True)
End If
End Function
now the function is running the jquery from the server side, this works well now i want to call this function from the client side inside a nested table in a listview like this
<td>
<div id="Div2" runat="server" %>'
<a href="#" onclick='<%# clsFunctions.runjQueryCode("$('#basic-modal-ontent').modal()", this) %>'></a>
<img src="../../Imgs/Linkquestionare.png" border="0"/></a></div>
</td>
Now i have two Questions. the first one is my function accept the JQuery string and the reference to the page. Well i can do this on the server side and i am able to do this nicely , but i want to do it on the client side
The following is content that i want to pass to the function as the first argument. /
"$('#basic-modal-ontent').modal()"
and as you can see, i tried to pass "this" trying to get the reference to the page.
1) in would like to pass that string in the function as my first argument
2) i want to pass the page reference to the function as my second parameter.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
I think you don't need to call ScriptManager.RegisterClientScriptBlock() or ClientScripManagert.RegisterClientScriptBlock instead you return getjQueryCode(jsCodetoRun) .
this will bind the script in on click event of the HTMLAnchor (<a> ... </a>)
Help people,so poeple can help you.
|
|
|
|
|
the function already does that.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
Hi
I have two posts: /post1, /post2
how I can create a link that every 20 seconds redirect to one of them. I mean if this link go to /post1, after 20 seconds if that or another person click on it go to /post2
please help me
thanks
|
|
|
|
|
|
Ok I'm trying to figure out how to loop through the values of my table cells (they all have a image in them). When I created the cells I named them with a id="A2" (for example).
the code I've been trying in testing looks like this:
savedSquares = document.getElementById('A2');
alert("a2 = " + savedSquares);
alert(document.getElementById("innerSquares").rows[0].cells.length);
address = document.getElementById("innerSquares").rows[0].cells[3].value;
alert("cell = " + address);
The results in order are
A2 = [object HTMLTableCellElement]
10 (this is correct)
cell = undefined
I've tried a bunch of other combos but this is what I currently have.
The images are also named the same so the image in "A2" is also named the same way:
<img src="images/o.jpg" border="0" height="100" width="100" name="A2" alt="Open">
Not sure if that will make it easier but I haven't been able to read those with my limited knowledge of JavaScript. The looping through part won't be a issue, I just need to figure out how to get the name of the image or even the alt text would be doable.
Thanks in advance!!
|
|
|
|
|
Ok so I made some progress... if I use
savedSquares = document.images['A2'].alt;
it retreives the alt value which is a step in the right direction. Just wondering if there is a better way?
|
|
|
|
|
It's not very clear to me what you are trying to do. Table cells don't have values, they are just container elements.
If you have a table cell, you can loop through its contents using cell.childNodes (where 'cell' is your cell element). Or you could get a list of all the images contained in the cell with cell.getElementsByTagName('img') .
W3schools has a decent reference and tutorial: http://www.w3schools.com/jsref/dom_obj_all.asp[^]
|
|
|
|
|
hai all
i want to browse the folder or image in javascript...i saw a code in html like instead of this...i want in javascript...is it possible...
Thanks & Regards
D.Sathyanarayanan
|
|
|
|
|
Start here[^].
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Goood response... Thumbs Up...
|
|
|
|
|
Hi everyone I've got these lines in the plugin can anyone make me clear what these means so I can tweak it.Thanx in advance
settings = {};
settings.tile_orchestration = this.tile_orchestration;
settings.h_res = 12;
settings.v_res = 1;
modified 23-Jan-12 2:58am.
|
|
|
|
|
You want to tweak somethign when you haven't got a clue what it does or how it works? Hilarious.
ps what is 'Thanx'? Is that a new word? Stcik to full-blown English here or you'll get short shrift.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
That's cold dude...and sad news for you I'm already tweaking it...
P.S.You are trying to be an smart a*s here thats not cool. Anyway thanx for reply...oooh sorry u don't like the word thanx
|
|
|
|
|
You would have to refer to the documentation for the plug-in but it looks like it is setting default settings when it initializes.
|
|
|
|
|
hi friends
i need to know how to convert html contents into plain text.
these html contents are from the ajax editor.
any help would be of great benefit to me.
K.Gayathri
|
|
|
|
|
sTART here[^].
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Here is a sample code to accept the value(HTML) from a text field and gives the Plain text out of it:
function Check(){
var pattern = new RegExp("<(.|\\n)*?>","g");
//alert(pattern);
alert(document.formName.fieldName.value.replace(pattern,""));
}
The HTML Portion :
String :
Text field can be replaced by reading the HTML content from .html file also.
INPUT:
<title>My html page
Hello world
OUTPUT :
My html page
Hello world
HTH
Sovan
modified 24-Jan-12 4:32am.
|
|
|
|
|
Hi,
I have one query plzzz help me.
http://www.indiafirstlife.com/web/media/press-coverage
when i go this URL and click on this link-- IndiaFirst Serve Maharashtra State Customers - Sunskruti
then one pdf open. But problem is that my client is saying to me pdf should open by name itself only not by the whole url.
Means suppose we have one pdf name as Test.pdf, then we click on link then it should be name Test.pdf not like that---
http://www.indiafirstlife.com/downloadPDF/PressCoverage/Test.pdf-Windows Internet Explorer
in blue bar of opening page.
|
|
|
|
|
Did you notice the last three words in that part of the display? This information is the title text and is displayed by the application itself, in your client's case Windows Internet Explorer.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
what to do.....have u any code that i can solve this issue?
|
|
|
|
|
Solve what? Explain to your client this is IE, nothing to do with your website.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
In this case you can change the file open process. If you tweak your file download script cleverly then the file will be directly downloaded or opened with the associated PDF reader file. File opening with associated application will give another benefit. It is really disturbing for me when I try to open a file and it open in the current page
|
|
|
|