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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:07:00+00:00 2026-06-02T13:07:00+00:00

I have been tasked with completing an app that is 75% done. It has

  • 0

I have been tasked with completing an app that is 75% done. It has been created using three technologies I’ve never used (I am a student on a work term): asp.net, ajax, and it is written in C#.

One of the features of this app is html generation. I have written a method, we’ll call it createHTML(). I have tested it as a standalone, and it works fine. I would now like to run it in the actual .net environment. When the user clicks the button btnCreate, the createHTML() method (which is being passed a NameValueCollection ‘page’) should grab a bunch of html and write it to a text file in a separate folder.

My question is: how do I do this? I have had some experience with VB .net, and normally what I would do there is go into design mode, double click on the btnCreate, and it would take me to the code view and I could code out a btnCreate_Click handler. However, the guy that wrote the original has all of the buttons hidden, and I can’t figure out how to find them. I tried to manual write a btnCreate_Click call with just a messagebox popup, but can’t get it to fire.

Compounding this issue, is that the original coder has written buttons throughout the app that are both asp:buttons, and regular HTML buttons. Should I be making this an asp button, or is it best to use html buttons? I understand the difference between using one for client side and the other for serverside, but when he’s used both, what’s best? And when using html, is that where the ajax comes in?

Apologies for the simplicity of this question, but it’s driving me crazy.

EDIT:

Apparently, I have been too wordy. Here is how the button is coded:

<button id="createButton" class="ui-state-default ui-corner-all">Create</button>

Which is the original html button (again – in this case do I use AJAX)?
Or should I do something like this:

<asp:Button ID="createButton" class="blah-blah-ui" PostBackUrl=".../somepage.aspx" runat="server" text="create" />?

If I do the asp button (which, at my level of AJAX – read:none – is probably best), how do I call the method that I have on a separate code behind page?

If my method is called showMessage() in ‘modify.aspx.cs’, how do I call this showMessage() method?

EDIT the second:

According to the answer I have received, I was on the right track. Problem is, onclick does not work. I found where the original coder hid all of the buttons, so I made them visible. In the properties window of my create button, OnClick is not even an option. The only option near that is OnClientClick, which I assume is for javascript?

  • 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-02T13:07:01+00:00Added an answer on June 2, 2026 at 1:07 pm

    I would say you should stick to using an asp:Button – just be aware this will cause the page to reload on each click, going the Ajax route avoids this but may be slightly harder to implement what you want.

    You will need to wire up the code to handle the button click the easiest way is to use the OnClick attribute like this

    <asp:Button ID="createButton" class="blah-blah-ui" runat="server" Text="create" OnClick="createButton_Click" />
    

    And then in your code behind you handle the event like this

    protected void createButton_Click(object sender, EventArgs e){}
    

    Inside that handler you can then do whatever is is you want to do.

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

Sidebar

Related Questions

I have been tasked with refactoring some components that used xmlbeans to now make
I'm new to visual basic and have been tasked with creating an app that
I have been tasked with decrypting a file in Java that has been encrypted
I have been tasked to develop an interactive website using java & mysql: using
I have an application that I've been tasked with cleaning up after. The application
I have been tasked with writing an ADP application using Access. The back-end data
I have been tasked with developing a Firefox add-on that is capable of registering
I have been tasked with improving the current mess that is our JavaScript strategy;
I have been tasked with modifying the layout of a site so that it
I have been tasked with refactoring a project that currently uses an EAV model

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.