Tag: asp.net

Determine what controls are failing on a ASP.NET web page

Is there an easy way to determine what controls are failing validation on an ASP.NET web site? I am debugging a page where Page.Validate(“group”) fails, but I don’t know what controls made the page fail. The page is rather big and the code a bit messy, so I am hoping that I could get a […]

Usercontrol access Javascript from a Content's Page's Master Page

Hello all I have a problem. I have a masterpage that all of my Content pages inherit from. Within this masterpage I have a script tag pointing to the Javascript file folder “~/Scripts/validation.js” On my content pages I use different usercontrols that require the use of many of the functions within the validation.js file however […]

How to detect whether postback originated from outside of particular div (client side)

Is there any way to detect postback (full/partial) originated from outside of a particular Panel (HTML DIV)? I would like to handle it in client side since I am planning to prompt the user in window.onbeforeunload event. Thanks for your suggestion!!!

How do you get the style of an element on an asp.net page

I have an admin page with an accordion javascript to show/hide divs. <div class=”accordion”> <h2>Pending</h2> <div id=”pending” class=”accordion-item”>PARTIALVIEW</div> <h2>Current</h2> <div id=”current” class=”accordion-item”>PARTIALVIEW</div> <h2>All</h2> <div id=”all” class=”accordion-item”>PARTIALVIEW</div> </div> when they delete an item, the page refreshes and they are back to collapsed. I want to have it remember which ones were open and which ones were […]

How to call javascript function from code-behind

Possible Duplicate: Calling javascript from code behind I wrote a javascript function on asp.net page. This is that.. function Alert(){ alert(‘hello’); } I want to call this function from code-behind view. How can I do.

How to verify if the Web Service caller is my web site?

For security reason, i need to garantee that only web client running an specif web site can access the web service. I’m doing verification over the domain request only, but i need to do some more robust. I think is too easy to break my security check.

How do you reenable a validation control w/o it simultaneously performing an immediate validation?

When I called this function to enable a validator from client javascript: `ValidatorEnable(document.getElementById(‘<%=valPassportOtherText.ClientID%>’), true); //enable` validation control the required validation control immediately performed it validation, found the value in the associated text box blank and set focus to the textbox (because SetFocusOnError was set to true). As a result, the side effect was that focus […]

Calling a non static method in Server Side by a Client Side Function

I can get an object from the server side by using static receive callbackresult methods from server side. But I want to run a non-static method in my page which populates an ajax accordion by calling a client side function. The object I am calling from server side is a complex object which I can’t […]

Highcharts – “Style is null or not an object”

So, I’m having some issues using Highcharts. It recently came up with an error that only fires up in Internet Explorer 8. The failing line comes up from the highcharts.src.js file line 270: function css (el, styles) { if (isIE) { if (styles && styles.opacity !== UNDEFINED) { styles.filter = ‘alpha(opacity=’+ (styles.opacity * 100) +’)’; […]

pass arguments from client side to server side

I have two comboboxes and would like pass selected value and text to the server method (RadComboBoxItemsRequestedEventArgs) when the first combobox selected index changed. Here is my code. But I am getting Javascript error message at this line. RadComboBox2.requestItems(item, false). Thanks for the help. <telerik:RadComboBox ID=”RadComboBox1″ runat=”server” OnClientSelectedIndexChanging=”LoadNames” OnItemsRequested=”RadComboBox1_ItemsRequested” /> <telerik:RadComboBox ID=”RadComboBox2″ runat=”server” AllowCustomText=”true” OnItemsRequested=”RadComboBox2_ItemsRequested” […]