scriptcontrol

ASP.Net Script Controls, Returning False from OnClick, and FireFox

Short Explanation: I have a script control that has the click event being handled in the script file. The Click handler pops up a confirm prompt and returns the prompt's value. Problem: IE sees the return False (Cancel is selected on the confirm box) and there is no postback. Firefox ignores this and fires the postback. Solution...

How do I Get the Autcomplete Control script side with a Script control (ASP.Net)

Problem How do I capture and assign the events on an Ajax Toolkit autoomplete control using a script control on the script file? Explanation I basically created a script control to combine a textbox and an autocoplete control so that I could have a working generic control for an autocomplete. The next step was to add things like a pro...

ASP.Net ScriptControl - Add the Javascript get_events method : Possible?

So I've run into a snag, apparently the get_events method is only "included" with the ExtenderControl class. What I need to do: Be able to call the get_events Javascript method using a ScriptControl since using an ExtenderControl isn't really possible at this point. I am hoping there is an easy way to have the scriptControl's javascri...

ASP.Net ScriptControl - Call one method from another

Say I have two script controls and one control has the other as a child control: ParentControl : ScriptControl { ChildControl childControl; } The script for the Child Control: ChildControl = function(element) { ChildControl.initializeBase(this, [element]); } ChildControl.prototype = { callMethod: function() { ret...

Javascript/Ajax - Manually remove event handler from a Sys.EventHandlerList()

I have two scriptcontrols, one holds the other, and I have successfully been able to handle events from the child on the parent using: initialize: function() { this._autoComplete = $get(this._autoCompleteID); this._onAutoCompleteSelected = Function .createDelegate(this, this.handleAutoCompleteSelected); var autoCont...

Creating an AJAX Script Control

Call me a 'n00b', but I am new to creating Script Controls. I want to create a simple control with 3 text boxes. I have a .cs file that looks like this: public class SmokingCalc : ScriptControl { public SmokingCalc() { Render(htmlWriter); } protected override void Render(HtmlTextWriter...

Script control client object loss of scope

I've got a script control that has a control embedded within it that exposes a server side property for a client side click event. For example, embeddedControl.OnClientAppointmentClick. So my question is how would I wire this event to my script control client object. I've tried something like embeddedControl.OnClientAppointmentClick =...

problem with get data from MSScriptControl

Hi to all! I have problem with get data from vbscript in C# console application. I just write below code: int[] i = new int[3] { 1, 2, 3 }; string msg = ""; object[] myParam = { msg , i}; MSScriptControl.ScriptControlClass sc = new MSScriptControl.ScriptControlClass(); sc.Language = "...

Ensuring unique ID attribute for elements within ScriptControl

I'm creating a control based on ScriptControl, and I'm overriding the Render method like this: protected override void Render(HtmlTextWriter writer) { RenderBeginTag(writer); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.Write("This is a test."); writer.RenderEndTag(); RenderEndTag(writer); } My question i...

Multiple ScriptControl instances sharing variable

I have a ScriptControl that uses an image as an embedded resource and GetWebResourceUrl to generate the WebResource.axd URL. I am currently using GetScriptDescriptors() to send the URL to the JavaScript object. The ScriptControl can be in a Repeater, so you may have 20+ instances. They all use the same images (not customizable through...

ScriptControl inside UpdatePanel

I have a ScriptControl (requires ScriptManager) with JavaScript to handle client-side interactions and ICallbackEventHandler to communicate back and forth. Everything works perfectly with one or multiple instances of the control on a page. I placed the control inside a GridView with sorting and it still works. However, I place the Gri...