473,386 Members | 1,757 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,386 software developers and data experts.

post back event for a button


Here's the question:

I have a form w/ TextBox controls and a Search Button control. Once the user
clicks the Search Button, they get a Modal dialog w/ a datagrid that contains
their search results. They select a row and click OK. The return value of the
Module triggers an method that populates the TextBoxes w/ values and disables
them. After the TextBoxes are disabled, I change the text of the buton to
"Search Again" since I have to allow users to search again if they don't like
the selection.

I need to figure out how to enable the fields if the user clicks the button
again w/o opening the Modal again. Once the fields are enabled, I want to
allow the user to click the Search Button again and get the Modal window w/
their results...

Are there any thoughts on this subject?

Thanks for the advice,
Galahad
Oct 27 '05 #1
8 1862
dear friend;
do you open the search result in a new page or what? if yes the textbox
search page is not posted back after the result comes up. and that means they
you have to repost back the page to enable the button and textbox.
or use java script to do such things!
--
PLEASE DO NOT FORGET TO RATE THE ANSWER
happy coding
Muhanad YOUNIS
MCSD.NET
"Galahad" wrote:

Here's the question:

I have a form w/ TextBox controls and a Search Button control. Once the user
clicks the Search Button, they get a Modal dialog w/ a datagrid that contains
their search results. They select a row and click OK. The return value of the
Module triggers an method that populates the TextBoxes w/ values and disables
them. After the TextBoxes are disabled, I change the text of the buton to
"Search Again" since I have to allow users to search again if they don't like
the selection.

I need to figure out how to enable the fields if the user clicks the button
again w/o opening the Modal again. Once the fields are enabled, I want to
allow the user to click the Search Button again and get the Modal window w/
their results...

Are there any thoughts on this subject?

Thanks for the advice,
Galahad

Oct 27 '05 #2
Galahad,

I had the idea it was a windows form application, what is quiet default here
in the dotnet newsgroup except as it is a kind of webform newsgroup.

Because of the answer from Mos and the word "post back", I become unsure,
because the answers are a little bit different, can you tell us what it is.

Cor
Oct 28 '05 #3
Dear Cor;
i think it is a mistake from me, i did not understand the question in the
right way. there for i admit it is my mistake here :) thank you for your
attintion
--
PLEASE DO NOT FORGET TO RATE THE ANSWER
happy coding
Muhanad YOUNIS
MCSD.NET
"Cor Ligthert [MVP]" wrote:
Galahad,

I had the idea it was a windows form application, what is quiet default here
in the dotnet newsgroup except as it is a kind of webform newsgroup.

Because of the answer from Mos and the word "post back", I become unsure,
because the answers are a little bit different, can you tell us what it is.

Cor

Oct 28 '05 #4
It is a webform.

"Cor Ligthert [MVP]" wrote:
Galahad,

I had the idea it was a windows form application, what is quiet default here
in the dotnet newsgroup except as it is a kind of webform newsgroup.

Because of the answer from Mos and the word "post back", I become unsure,
because the answers are a little bit different, can you tell us what it is.

Cor

Oct 28 '05 #5

It is a webform. The search result is opened in a new modal window. I have
no issue disabling the textbox after the user first choosing a selection.
However after that the user may want to search again so I have to figure out
a way for the user to click the Seach button again which would enable the
fields, BUT not open the modal again. The user would then input text and
click Search. Upon click event the modal window would open again. It is kinda
a weird requirement I know...

If you have any thoughts on maybe a better way to do this functionality
maybe w/a reset button, please let me know...thanks

"mos2128" wrote:
dear friend;
do you open the search result in a new page or what? if yes the textbox
search page is not posted back after the result comes up. and that means they
you have to repost back the page to enable the button and textbox.
or use java script to do such things!
--
PLEASE DO NOT FORGET TO RATE THE ANSWER
happy coding
Muhanad YOUNIS
MCSD.NET
"Galahad" wrote:

Here's the question:

I have a form w/ TextBox controls and a Search Button control. Once the user
clicks the Search Button, they get a Modal dialog w/ a datagrid that contains
their search results. They select a row and click OK. The return value of the
Module triggers an method that populates the TextBoxes w/ values and disables
them. After the TextBoxes are disabled, I change the text of the buton to
"Search Again" since I have to allow users to search again if they don't like
the selection.

I need to figure out how to enable the fields if the user clicks the button
again w/o opening the Modal again. Once the fields are enabled, I want to
allow the user to click the Search Button again and get the Modal window w/
their results...

Are there any thoughts on this subject?

Thanks for the advice,
Galahad

Oct 28 '05 #6
Galahad,

Sorry that I have to ask than more, what is than a modal window. I assume
that you open an extra webpage. (And than it is important how AFAIK do you
have in ASPNET only have pages, not modal windows or it should be the html
"prompt").

Cor
Oct 28 '05 #7
Yes a webform is opened in a new window. It is opened with javascript:
window.showModalDialog. A modal window is simply a dialog box such as you
would see when you print a document or things of that nature

"Cor Ligthert [MVP]" wrote:
Galahad,

Sorry that I have to ask than more, what is than a modal window. I assume
that you open an extra webpage. (And than it is important how AFAIK do you
have in ASPNET only have pages, not modal windows or it should be the html
"prompt").

Cor

Oct 28 '05 #8
Galahad,

The only thing that I know that will function in this with ASPNET is this.

Not that there are no alternatives but than I don't know them.

\\\\
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim str As String
If Not IsPostBack Then
TextBox1.ForeColor = Color.White
TextBox1.BorderStyle = BorderStyle.None
Dim alertScript As String = _
"<script language=JavaScript>document.all.item('TextBox1'). value
" & _
" = prompt('Give me text','My name is nobody'); </script>"
RegisterStartupScript("Startup", alertScript)
Else
str = TextBox1.Text
End If
End Sub
///

I hope this helps a little bit?

Cor
Oct 28 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dominosly | last post by:
Okay, this is a rather complicated problem, so here is the short of it: I am using a custom designed user control that simply writes out a plain old html submit button to the page. When the...
6
by: Eagle Rock | last post by:
Hi all, This is probably a simple question, but I'm just getting started in ASP.NET, and I can't find the answer. I have a simple form with a "Submit" button. When the user clicks on the...
3
by: Ravi | last post by:
Hi, I have a simple .aspx page where user enters data (e.g Name address, etc). At the end, he/she clicks Save button which Posts to the same page and in the Save button's click event I am saving...
2
by: sk2000 | last post by:
Hello All, I'm creating a web form with user controls in different HTML table cells (User Controls are place in the table cells at design time ). For some reason none of the Button type...
5
by: Gary Vidal | last post by:
I have a client side Javascript which checks an OrderQuantityField against a hidden Textbox of the Minimum Order Quantity. I dont want to do validation on a postback. I would like to be able to...
6
by: Mark | last post by:
I have two dropdown lists. Both have autopostback set to true. In both dropdowns, when you select an item from the list, it redirects to the Value property of the dropdown. Nothing fancy. ...
2
by: Ghafran Abbas | last post by:
Call this function from the Page_OnLoad event of your asp.net page. This will prevent the user from doing multiple post backs or button clicks. This was designed to not disable the button, because...
6
by: tshad | last post by:
I am trying to set up a Javascript popup box that has a way of sending back a message to asp.net on how to process some data. At the moment I am just doing: ...
6
by: guoqi zheng | last post by:
In a regular html form, when user press "enter" key, the form will be submitted. However, in ASP.NET web form, a form will only be submitted (post back) when a special button is clicked. Many...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...

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.