Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating an event for a textbox and AJAX Update Panel Control
    primarykey
    data
    text
    <p>I wanted to create a "Click" event for a textbox in C# (as there isn't any).</p> <p>So, this way </p> <pre><code>protected void Page_Load(object sender, EventArgs e) { if (Request["__EVENTARGUMENT"] != null &amp;&amp; Request["__EVENTARGUMENT"] == "txt1OnClick") { txt1_Click(); } txt1.Attributes.Add("onclick", this.Page.ClientScript.GetPostBackEventReference(txt1, "txt1OnClick")); } private void txt1_Click() { ImageMap1.ImageUrl = "guide/1.jpg"; } </code></pre> <p>Then I wanted to load the image without reloading the page. </p> <p>So I used the AJAX UpdatePanel Control and this worked fine with </p> <pre><code>protected void Button1_Click(object sender, EventArgs e) { ImageMap1.ImageUrl = "guide/1.jpg"; } </code></pre> <p>But not with the event I created, because the compiler doesn't identify my new events as a real event or something I couldn't figure out.</p> <p>I added the button1_click event according to Step 8 of "<a href="http://msdn.microsoft.com/en-us/library/bb399001.aspx" rel="nofollow noreferrer">Refreshing an UpdatePanel Control with an External Button</a>".</p> <p>The click event of textbox is not shown in this option:</p> <p><img src="https://i.stack.imgur.com/dhows.png" alt="textbox"></p> <p>So my question is is there any way to add this event within <code>System.Web.UI.WebControls.TextBox</code> class or, to make this event visible within the above option?</p> <p>So that I can include click event of the textbox within the Triggers of the update panel. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload