Hi
I have an problem in asp.net code behine vb.net. :confused: I need to clear the controls while postback the page. eg:- i am getting the input of an child information(nam e, age, qualification, address, and so on), when i click the (save)button the present information should save in database and clear the control to accept the information for the second child in a single page itself.
My problem is after i click the save button, the data are saved in database, but the controls are not clear for getting the second child, controls are retain the previous information. i need to clear controls while getting information for 2nd child :confused:
hope u may get my problem
Bye
Prabhu
3 2519
You can use the method Clear() for each control, and after that, you can load them again. For example for the object DropDownList ddl, you write:
ddl.Items.Clear ();
In the button click event set each control's text property to textbox1.text=" ".
Hope it will work.
On page load event of your of your page re-initialize all controls to have blank values.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Sam |
last post by:
I have a custom control (MyTextBox - taken from Microsoft website)
that implements the IPostBackDataHandler interface. It is added to
the controls collection of a placeholder control during the Page Load
of a main ASPX page. Now if we debug the MyTextBox, we find the order
of events like so (during a Posback, of course): OnInit -> OnLoad ->
LoadPostData.
My question is why does the LoadPostData occur *after* the OnLoad
instead of...
|
by: Glenn Owens |
last post by:
I have an ASP.Net page on which there are serveral static controls
(listboxes, radiobuttonlist and textboxes). These controls are used to
create criteria from which the code-behind will dynamically create 1-n
datagrids.
When the Submit button is clicked I need to save (in viewstate) the
contents of the criteria controls so that I can recreate the dynamic
DataGrid(s) in the LoadViewState (overloaded method). I need to do
this so that the...
|
by: jw56578 |
last post by:
When a page does a post back and there is data in a textbox, that
textbox will get automatically repopulated with that data due to the
posting of the form. Disabling viewstate has no affected on textbox
controls, so how do you make it so that the text box value is cleared
out on postback?
|
by: Psych971 |
last post by:
Hi, I'm wondering how I can generate a postback using javascript on a page
that does not have any controls with the auto-postback property set to true.
I know I can just use the submit() function but this triggers page
validation which I do not want. What I'm trying to do is dynamically write
in a hyperlink that when clicked will remove an item from the form, so I
don't want any validation to occur because the form isn't being submitted at...
|
by: Adrian Parker |
last post by:
At postback time, the controls are all recreated before an event fires. If
the event determines that some of the controls need to be replaced with
different controls that you can't create as invisible beforehand, how do you
go about it ? Can you force a re-run of the control creation step ?
Thanks
Adrian Parker
| |
by: John |
last post by:
Hi all,
After one of my user controls does either a server.transfer or
response.redirect, the action method in a my resulting html form is being
set and any request variables changed at the client are not being reflected
upon posting. How can I get rid of this? Can I somehow programmtically clear
the action method so by the time the html reaches the client, it's clear?
Please help - quite urgent.
|
by: tperri |
last post by:
I've got a page with a couple ascx files on it. One od the controls displays
a user's picture, the other contains a datagrid where a user can upload more
pictures, change their default picture, etc.
When a user selects a different picture in the contorl containing the
datagrid, the code execute when the page postsback, but the control that
displays the user's picture does not.
How do I get this control to refresh on a post back?
|
by: Jeff User |
last post by:
Greeting
I built asp.net (V1.1) page.
I want to use this button to reset SelectedIndex=0 on several drop
down lists. However, I do not want to post back to server. The point
is to avoid the round trip.
It had an asp:button which would post back to the server when clicked
but changed it to an input button to avoid the postback. (If that is
not needed,let me know)
|
by: ThunderMusic |
last post by:
Hi,
I have a page where I have an input type=file control and many other
controls... the thing is, when I cause a postback by any control on the
page, if a file is selected in the input type=file, the file is posted...
so I want to clear the file in the input on all submit except when the
upload button is pressed... actually, with an alert, I can display the
value of the input type=file when it should be cleared and it does not
display...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |