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 8227109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:00:43+00:00 2026-06-07T16:00:43+00:00

I am using an ajax htmleditor in asp.net web application so i am trying

  • 0

I am using an ajax htmleditor in asp.net web application so i am trying to get the text the user has entered in the editor then i will send that text back to the client javascript function that will show the text in a div. But I am getting this error “Object reference not set to an instance of an object.”

Firstly i tried to access the text of textbox linked with htmleditorextender through javascript but it was not working for me so i moved to ajax webmethod but this time also i am facing a problem. Please Help me.

    [System.Web.Services.WebMethod]
    public static string seteditor()
    {
        String x="";
        try
        {
            Content c = new Content();
            x = c.txteditor.Text;
        }
        catch (Exception ex) { x=ex.Message; }
        return x;
    }

Here, txteditor is the ID of asp:textbox which is linked with ajaxcontroltoolkit htmleditorextender.

  • 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-07T16:00:45+00:00Added an answer on June 7, 2026 at 4:00 pm

    You cannot get your aspx controls inside a static method.
    If you are Calling a static method from jquery means the Page and its Controls don’t even exist. You need to look another workaround for your problem.

    EDIT:

    I always pass my control values to page methods like this:

    Assume I have two text controls: txtGroupName and txtGroupLevel
    

    …My JS with Jquery will be :

    var grpName = $("#<%=txtGroupName.ClientID%>").val();
    var grpLevel = $("#<%= txtGroupLevel.ClientID %>").val();
    
    data: "{'groupName':'" + grpName + "','groupLevel':'" +   grpLevel + "'}",
    

    Where groupName and groupRights are my webmethod parameters.

    EDIT2:

    Include your script like this:

    <script type="text/javascript" src="<%= ResolveUrl("~/Scripts/jquery-1.4.1.js") %>"></script>  
    

    I suggest you to use the latest jquery version.

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

Sidebar

Related Questions

I am using Microsofts ASP.NET Ajax HTML editor found here http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/HTMLEditor/HTMLEditor.aspx . When I
I am using AJAX in asp:net and am trying to handle a situation where
I'm using ajax to get what the user has selected in a select box
I'm using the MS AJAX HTMLEditor component on a web site. However, I want
Please help me to get text (non html/ not formatted) from ajax text editor
I have jquery using ajax/json to grab an elements ID and then hits: [System.Web.Services.WebMethod]
I would like to using (Ajax) PHP or Javascript, Post information to http://en.lernu.net/cgi-bin/vortaro.pl then
I am using ajax and asp.net. iI have a javascript function which creates many
I am using Ajax in java web application and i want to take the
I am using Ajax to post the comments of the website. No the user

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.