Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7714807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:13:27+00:00 2026-06-01T02:13:27+00:00

I have 2 update panel in one update panel i have a datalist and

  • 0

I have 2 update panel in one update panel i have a datalist and in other update panel I have a textbox with tinymce editor.

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
 <asp:DataList ID="dlst1" runat="server" RepeatDirection="Horizontal" CellSpacing="5" CellPadding="7" 
     DataKeyField="Id" CaptionAlign="Left" OnItemCommand="dls1_ItemCommand"                        
     OnItemDataBound="dlst1_ItemDataBound">
   <ItemTemplate>
     <asp:ImageButton ID="btnImg" OnClientClick="javascript:void(0);" 
       runat="server" ImageUrl='<%#"~/Controls/Images.ashx?FileName=" +DataBinder.Eval(Container.DataItem, "FilePath") %>' 
       CommandName="Select" OnCommand="Select_Command" 
        CommandArgument='<%# Eval("Id").ToString() ' />   
   </ItemTemplate>
</asp:DataList>
</ContentTemplate>

<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Always">
<ContentTemplate>
   <asp:TextBox ID="TextBox1" CssClass="tinyEditor" ClientIDMode="Static" runat="server" TextMode="MultiLine"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>

for making tinymce worked I am using

ScriptManager.RegisterClientScriptBlock(UpdatePanel2, this.GetType(), "init", "tinyMCE.execCommand('mceAddControl', false, '" + TextBox1.ClientID + "');", true);

var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
TinyMCEEditor();
});

$(function () {
TinyMCEEditor();
});

my TinyMCE Editor

 function TinyMCEEditor() {
tinyMCE.init({
    mode: "textareas",
    theme: "advanced"
});
}

on page load.

I am giving the text for every image, for the previous image I am storing the textbox value in a view state, suppose I have 3 images for image 1 i have given the text abcd and selected image2, so image 1 text will store in the viewstate.

on Select_Command:

 if (ViewState["txbtext"] != null)
            txbtext= (Hashtable)ViewState["txbtext"];
        int index1 = previouslySelectedIndex;
        if (index1 != -1)
        {
            ImageButton imgbtn= (dlst1.Items[index1].FindControl("btnImg") as ImageButton);
            if (imgbtn!= null)
            {
                string[] ImgStr = imgbtn.CommandArgument.ToString().Split(';');
                Int32 selectedId = Convert.ToInt32(Str[0]);
                if (txbtext!= null && txbtext.ContainsKey(selectedId))
                    txbtext[selectedId] = textbox.Text;
                else
                    txbtext.Add(selectedId, textbox.Text);
            }
        }
        ViewState["txbtext"] = txbtext (//this is the hashtable);
      }

when I was not using update panel it was working fine, but as I am using update panel I am not able to store the textbox value in viewstate,

Please someone tell me how can I fix this issue, if possible give some exp. code.

Some one plz help me

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:13:28+00:00Added an answer on June 1, 2026 at 2:13 am

    I have added

    onchange_callback: function(ed) { ed.save(); }
    

    for my TInyMCE Editor its working now…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a datalist inside the panel <asp:Panel ID=Panel1 runat=server ScrollBars=Vertical> <asp:DataList ID=DataList1 runat=server
I have one update panel inside which I have datalist. This update panel triggers
I have two check boxes in an update panel. One is an ASP.NET CheckBox
I have update panel that content check box, textbox, 3 DropDownList with CascadingDropDown extender.
I have an update panel in a repeater (Edit: I removed Runat and Id
hi i am using update panel in my project, one page i have file
In an asp.net/c# application, I have an update panel on my main page. And
i have one label out of update panel and one button inside update panel.
I have a master page that has an update panel on it. One of
I have a page with two ContentPlaceHolders. One has a DropDown and another UpdatePanel

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.