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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:40:25+00:00 2026-06-17T23:40:25+00:00

// text Box &nbsp;&nbsp;<asp:TextBox ID=TextBox3 runat=server BackColor=Silver BorderColor=Silver ontextchanged=TextBox3_TextChanged style=margin-left: 6px Width=154px></asp:TextBox> // Submit

  • 0
// text Box
        &nbsp;&nbsp;<asp:TextBox ID="TextBox3"  runat="server" BackColor="Silver" 
            BorderColor="Silver" ontextchanged="TextBox3_TextChanged" 
            style="margin-left: 6px" Width="154px"></asp:TextBox>

// Submit button
        &nbsp;<asp:Button ID="Button6" runat="server" BackColor="Silver" 
            onClientclick='store_memID()' style="margin-left: 20px" Text="Submit" 
            Width="102px" Font-Bold="True" Height="28px" />


    <script type = "text/javascript">
        // Function to caputure client-input- Member_ID.
        function store_memID() {

            var mem_ID = document.getElementById('TextBox3').value;


            return confirm('TimeLine is displayed for: ' + mem_ID);
        }

    </script>

When I run the code and enter a value into the text box and then press the submit button:-
“Microsoft JScript runtime error: Unable to get value of the property ‘value’: object is null or undefined”.

Else, if I remove the ‘.value’ :-

<script type = "text/javascript">
    // Function to caputure client-input- Member_ID.
    function store_memID() {

        var mem_ID = document.getElementById('TextBox3');


        return confirm('TimeLine is displayed for: ' + mem_ID);
    }

</script>

and then run the program, enter value in text box and press submit then i get :-

“TimeLine is displayed for: Null”

I have been looking into solving this problem. not sure whats going wrong…

Edit (fix):- Server Side ID for my text box is ‘TextBox3’ but this doesn’t necessarily match up with the client side ID.
to get Client Side ID:- ‘<%=TextBox3.ClientID%>’

  • 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-17T23:40:26+00:00Added an answer on June 17, 2026 at 11:40 pm

    It’s been a while since I wrote asp forms but it is likely that the id on the client side (in your browser) is not what you think it is. This is/was one of the major pitfalls of web forms in my mind (This may have been made simpler in version 4.0, you’ll have to check that). You could use a css class (and use jQuery or similar to find your element) or inject the client side id into the java script e.g.;

    <script type = "text/javascript">
        // Function to caputure client-input- Member_ID.
        function store_memID() {
            var mem_ID = document.getElementById('<%=TextBox3.ClientID%>').value;
            return confirm('TimeLine is displayed for: ' + mem_ID);
        }
    </script>
    

    UPDATE: fixed case error in ClientID as pointed out in comments

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

Sidebar

Related Questions

I have following HTML structure : <asp:TextBox ID=txtFrom class=textBox js-min runat=server /> <asp:RequiredFieldValidator ID=strtDtValidator
<asp:GridView ID=GridView2 runat=server AllowPaging=True AutoGenerateColumns=False DataSourceID=opendiarysource Font-Size=Small style=font-size: 8pt; border-top-style: solid; border-right-style: solid; border-left-style:
<asp:TextBox ID=CommentBox runat=server TextMode=multiLine CssClass=commentTbx onKeyDown=limitText(this,200); onKeyUp=limitText(this,200);valid(this);></asp:TextBox>&nbsp; function valid(f) { !(/^[A-zÑñ0-9-\s]*$/i).test(f.value)?f.value = f.value.replace(/[^A-zÑñ0-9-\s]/ig,''):null; }
Lets say I have if (textbox.Text != null && textbox.Text.Length > someNum) { //some
I have created a DataList in asp.net - <asp:DataList runat=server ID=pTextBox> <ItemTemplate> <asp:CheckBox ID=CheckBoxPN
Hi experts please see this code: <asp:UpdatePanel ID=UpdatePanel1 runat=server UpdateMode=Conditional> <ContentTemplate> <table border=1 cellpadding=8
<asp:LoginView ID=LoginView4 runat=server> <AnonymousTemplate> <asp:DropShadowExtender ID=DropShadowExtender3 runat=server TargetControlID=Panel3 Opacity=.38 Rounded=true> </asp:DropShadowExtender> <asp:Panel ID=Panel3 runat=server
I need this asp:TableRow to show conditionally. <asp:TableRow> <asp:TableCell><asp:Label id=ExtraAmountType runat=server Width=182px></asp:Label></asp:TableCell> <asp:TableCell Width=10%
Problem: I have an asp.net Textbox that I am putting text into and on
Html text box should have same font size for both upper and lower case

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.