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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:27:03+00:00 2026-05-27T00:27:03+00:00

I’ve designed a web page in asp.net. And in that page i placed html

  • 0

I’ve designed a web page in asp.net. And in that page i placed html control too like <a> & <div>. I have written one java script function which is hiding the <div> when i’m clicking on the <a> tag. Its working fine. But when i’m clicking on the asp.net button then page refresh occur again. And it is loading my previous design of the page. I set the display:none of the <div> at the design time. so it is hiding my <div> again when occuring any other server side event. And i don’t want let it happen.

Javascript function-

<script language="javascript" type="text/javascript">
       function toggle5(showHideDiv, switchTag) {
           try {
               '<%Session["temp"] = "'+more+'"; %>';
               var ele = document.getElementById(showHideDiv);
               var imageEle = document.getElementById(switchTag);
               if (ele.style.display == "block") {
                   ele.style.display = "none";
                   imageEle.innerHTML = 'More';
               }
               else {
                   ele.style.display = "block";
                   imageEle.innerHTML = 'Less';

               }
           }
           catch (err) {
               alert("Error");
           }
       }
</script>

html code is-

<div id="divSearch" style="float:left;height:100%;width:100%;">
<span style="float:right;height:27px;"><a id="displayText" href="#" onclick="javascript:toggle5('toggleText', 'displayText');">More</a></span>
</div>
<div id="toggleText" style="display:none;height:100%;width:100%;">
<div id="divCalls" style="width:24%;float:left;height:30%;">
<span style="float:left;width:100%;color:#3b5998;">
            <asp:CheckBox ID="chkNoCall" runat="server" Text="No call made in " 
        AutoPostBack="True" oncheckedchanged="chkNoCall_CheckedChanged"/>
    <asp:TextBox ID="txtNoCall" runat="server" Width="12%" Enabled="False"></asp:TextBox><span> days</span></span>
</div>
</div>

C#.net code of the Checkbox-

protected void chkNoCall_CheckedChanged(object sender, EventArgs e)
    {
        if (chkNoCall.Checked == true)
        {
            txtNoCall.Enabled = true;
        }
        else
        {
            txtNoCall.Enabled = false;
            txtNoCall.Text = "";
        }

    }

How to solve this problem?

thanks

  • 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-05-27T00:27:04+00:00Added an answer on May 27, 2026 at 12:27 am

    put this data inside the updatepanel like this

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
        <span style="float:left;width:100%;color:#3b5998;">
                <asp:CheckBox ID="chkNoCall" runat="server" Text="No call made in " 
            AutoPostBack="True" oncheckedchanged="chkNoCall_CheckedChanged"/>
        <asp:TextBox ID="txtNoCall" runat="server" Width="12%" Enabled="False"></asp:TextBox><span> days</span></span>
    
        </ContentTemplate>
        </asp:UpdatePanel>
    

    hope this help

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I have thousands of HTML files to process using Groovy/Java and I need to
I'm working with an upstream system that sometimes sends me text destined for HTML/XML

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.