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

  • Home
  • SEARCH
  • 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 9141281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:37:28+00:00 2026-06-17T09:37:28+00:00

I am having a problem with my radTextBox values, the values inserted via JavaScript

  • 0

I am having a problem with my radTextBox values, the values inserted via JavaScript is being removed after the post back happens but the values inserted through c# are there. I am taking values from radgrid and inserting them into textbox.

The scenario:

1: insert or append values via JavaScript
2: insert or append values via c# method which triggers postback

Html Code for Textbox:

<telerik:RadTextBox ID="rtxtToEmail" runat="server" Width="300px" Skin="Office2007"
                            TextMode="MultiLine" ViewStateMode="Enabled">
                        </telerik:RadTextBox>

Html Code for Button that calls JavaScript function:

<telerik:RadButton ID="rdbtnTo" runat="server" Skin="Office2007" Width="68px" Text="Selected" OnClientClicked="ToSelected" AutoPostBack="false">
                    </telerik:RadButton>   

Javascript Code:

function ToSelected(sender, args) {
                         var grid = $find("<%=rgWOAssignedType.ClientID %>");
                        var DataItem = grid.get_masterTableView().get_dataItems()[grid._selectedIndexes];
                        var keyValues = DataItem.getDataKeyValue("Email");
                        //alert(keyValues); return false;

                        if (keyValues != "") {
                            document.getElementById("<%= rtxtToEmail.ClientID %>").value +=
                             keyValues + ";"
                        }
                        return false;
                    }

C# Code on button click event which triggers the post back:

protected void rbtnToClient_Click(object sender, EventArgs e)
        {
            try
            {
                #region Fill To CLient Email

                if (ViewState["ClientEmail"] != null)
                {
                    if (!string.IsNullOrWhiteSpace(ViewState["ClientEmail"].ToString()))
                    {
                        rtxtToEmail.Text += ViewState["ClientEmail"].ToString() + ";";
                    }
                }

                #endregion
            }
            catch (Exception ex)
            {
                try { throw new WTLIB.WTException(ex); }
                catch (WTLIB.WTException eX) { eX.WriteToEventLog(); eX.MessageError(Page); }
            }
        }
  • 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-17T09:37:29+00:00Added an answer on June 17, 2026 at 9:37 am

    Since you are using a server control, you must also use the provided javascript API or the control will not work correctly.

    get_textBoxValue(), set_textBoxValue()
    string
    Gets or sets the value the user input text. It is not assigned as the value of the input control if it contains an error.

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

Sidebar

Related Questions

Having problem with this bit of code qith jQuery. it should pick the values
im having problem whith a POST request. I have to receive an XML message
We are constantly having problem with our application being broken due to the Unity
I'm having problem getting all the values in datalist here is the problem: I
I having problem in my application.. I am pressing back button in my third
I am having problem with Jquery tabs UI. <script type=text/javascript> $(document).ready(function() { $('.tabs').tabs(); $('.subtabs').tabs();
I'm having problem with getting location.hostname for newly created window in javascript. For example
I`m having problem in getting an attribute from a xml object into JavaScript from
I am having problem displaying values set by select elements created by FormHelper .
Having problem with the middle Div not expanding to the width http://acs.graphicsmayhem.com/images/middiv.jpg Ok, how

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.