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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:36:26+00:00 2026-05-15T17:36:26+00:00

<asp:button runat=server Text=Save as OnClick=btnSave_click OnClientClick=if(!Check(‘<% # tb.ClientID %>’)) return false; return Object(); CausesValidation=false></asp:button>

  • 0
<asp:button runat="server" Text="Save as" OnClick="btnSave_click" 
OnClientClick="if(!Check('<% # tb.ClientID %>')) return false; return Object();" 
CausesValidation="false"></asp:button>

<asp:TextBox runat="server" ID="tb"></asp:TextBox>

Server tags don’t work here. I spend a 1-2 hours to find some way to make this work, but i didn’t find anything.

Server tags works in:

<OnClientClick="JSFunc();"

<script type="text/javascript">
    function JSFunc()
    {
         var el = document.getElementById('<% # tb.ClientID %>');
         //some actions with el here
    }
</script>

or something others with c#.

Is There no way to make server tags working inline? (first example)

ps. Sorry for the bad English

  • 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-15T17:36:27+00:00Added an answer on May 15, 2026 at 5:36 pm

    Using an expression builder, you don’t need to call databind and you can inline this quite easliy.

    see here

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

Sidebar

Related Questions

<asp:TextBox ID=TextBox1 runat=server></asp:TextBox> <asp:Button ID=Button1 runat=server UseSubmitBehavior=false OnClick=Button1_Click OnClientClick=this.disabled = true; this.value = 'Submitting...';
I have an asp.net button to update database <asp:Button ID=btnSave runat=server Text=SaveChanges OnClick=btnSave_Click CssClass=saveButton
I have this much HTML <asp:Button ID=btnSaveContest runat=server Text=Save &amp; Publish Contest OnClientClick= ValidateCreateContest();
HTML <body> <form id=form1 runat=server> <asp:Button runat=server ID=a OnClick=a_Click Text=apd/> </form> </body> Code protected
inside of while loop, i've used <asp:Button ID=<%=objReader.Item(0)%> OnClick=btn_Click runat=server CssClass=submit_button Text=Delete /> Sub
When I would be able to write : <asp:TextBox id=Input runat=server/> <asp:Button onclick=<% Input.Text='my
I have the following: <EditItemTemplate> <asp:Button ID=wrqst_need_ind_btn runat=server Text = Create WR onClientClick=javascript:popUp('popup_createWR.aspx') CommandArgument='<%#
I want to trigger on click of a button this: <asp:Button runat=server ID=submit Text=Submit
Consider the following: <form runat=server> <div> <asp:TextBox runat=server ID=tb1 /> <asp:Button runat=server ID=b1 OnClick=b1_Click
<body> <form id=form1 runat=server> <div> <asp:Button ID=Button1 runat=server Text=Button /> <div id=div1>Click here</div> </div>

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.