473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to execute code behind without postback

I am developing web application in asp.net

I want to execute code behind button or text boxes without post back.
Is it possible and if yes how can i do it
Nov 12 '14 #1
1 3732
Frinavale
9,735 Expert Mod 8TB
In web development there are 2 major components that are involved in the process:
  1. Client side processing: these are things executed within the web browser (like JavaScript or CSS styles)
  2. Server side processing: these are functions executed on the web server to process data and generate dynamic output that is sent to the browser to render content


A "Postback" is the process of sending information from the browser to the server. The server then does processing and sends content back to the browser so that the user can see it and after interacting with it can then do more postbacks to the server for further processing.

So I am having a problem with answering your question:
I want to execute code behind button or text boxes without post back.
Because I have no idea what the "code behind" for the button click does or what your textboxes do....


Depending on what you are trying to do, it may be possible to implement some JavaScript code that can do processing client-side in the browser.

Or, maybe you just want to sent parts of the page up to the server for processing, asynchronously to the rest of the page... in which case you will need to use AJAX (which is just JavaScript that is responsible for posting data to the server for processing without having to post the whole page to the server).


So, think about what you are trying to do and answer this question "Does my button click need to be processed on the server for things like saving data? Or can my button click be executed in the browser because it doesn't need to save data or request additional information that is not accessible in the browser..."

-Frinny
Nov 12 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ken Tucker | last post by:
I've read about this issue in many articles across the net... But haven't found a solution. I see all kinds of custom code to perform sorting with datagrids, but my example is so simple, I must...
2
by: Ronnie Scott | last post by:
I just came across a nice dropdown replacement that populates on-the-fly, and wondered if anyone knew how to do the sort of thing it does. As far as I knew, you couldn't do what it does. I...
4
by: Marcel Balcarek | last post by:
I want to create a button using code-behind that only executes javascript, and does not post back to the server. How can I do this - my ImageButton insists on posting back to the server. Thank...
4
by: Carlo Marchesoni | last post by:
I have a button that opens a new Window (some kind of search-window), which is fired using JavaScript (btnSearch.Attributes=".....";) Now I need to run some code behind code BEFORE this JavaScript...
17
by: tshad | last post by:
Many (if not most) have said that code-behind is best if working in teams - which does seem logical. How do you deal with the flow of the work? I have someone who is good at designing, but...
2
by: Oleg | last post by:
Let's say I rendered a bunch of controls with the same name and different IDs. On postback, can I somehow iterate through these controls (checkboxes in this case, but could be dropdown controls in...
7
by: Andy | last post by:
Hi, I have a complicated question that I'm hoping someone can help me out with. I have a webpage that contains a plug-in. This plug-in can communicate/pass data with the webpage that contains it...
1
by: Kamal Ahmed | last post by:
Hi All, I have an aspx file written using vb.net that contains code both in code behind and inline. I want to access variable, object/classes declared in code behind into inline .aspx file....
9
by: antonyliu2002 | last post by:
I have a C# class GeneralUtilities.cs , which many of my aspx.cs files will refer to. So, I've put it under the App_Code folder and compiled it to library using csc /target: library from the DOS...
8
by: Gary | last post by:
Hello, I am currently new to .NET, as you can probably tell by my last two or three threads!!! Anyway, I am using code behind as much as possible - and am curious about the way in which...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.