473,503 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Submit in User Control

If I have one page aspx that is using two same user control, how can I know
in page load event of aspx that which id of user control is submit ?
Nov 17 '05 #1
2 2669
You get the SubmitControl ID in the Request.form
Collection - if you have two usercontrols with ids UC1
and UC2 and in both there is a button PbSubmit, and you
press PbSubmit in Uc2, request.form["UC2:PbSubmit"]
exists and
request.form["UC1:PbSubmit"] doesn`t exists. So you could
write in PageLoad:

if (!IsPostback)
{
if (request.form["UC2:PbSubmit"]!=null)
{ Uc2 submitted}
if (request.form["UC1:PbSubmit"]!=null)
{ Uc1 submitted}
}
-----Original Message-----
If I have one page aspx that is using two same user control, how can I knowin page load event of aspx that which id of user control is submit ?

.

Nov 17 '05 #2
Almost done.
But below routine is for checking there is user control in form or not but I
need to check that which submit button is pressed from user control.
"mike" <do*****@gmx.at> wrote in message
news:01****************************@phx.gbl...
You get the SubmitControl ID in the Request.form
Collection - if you have two usercontrols with ids UC1
and UC2 and in both there is a button PbSubmit, and you
press PbSubmit in Uc2, request.form["UC2:PbSubmit"]
exists and
request.form["UC1:PbSubmit"] doesn`t exists. So you could
write in PageLoad:

if (!IsPostback)
{
if (request.form["UC2:PbSubmit"]!=null)
{ Uc2 submitted}
if (request.form["UC1:PbSubmit"]!=null)
{ Uc1 submitted}
}


Nov 17 '05 #3

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

Similar topics

1
2883
by: Daniel | last post by:
For an odd reason that I cannot figure out on my own, when a user attempts to log-in on my Log-In page, they must press the submit button twice. They fill out their credentials (username,...
2
8096
by: Laermans_k | last post by:
Hi, Does anyone have a solution to use the <input type="file" id="filechooser"> and the <input type="submit" id="submitbutton"> in 1 button click? I've already tried to create a javascript...
1
1050
by: george d lake | last post by:
Hi, I have a textbox and a listbox in a User Control When I click on a line in the listbox I populate the text box. This works perfect. No, on the page that has the UC in it, I also have a submit...
2
3965
by: Owin | last post by:
Hi all, I've created an User control. It's an extension of a textbox wich has some extra properties so that validation becomes a lot faster. The control wordks great if autopostback is on. When...
4
15670
by: owingruters | last post by:
Hi all, I've created an User control. It's an extension of a textbox wich has some extra properties so that validation becomes a lot faster. The control wordks great if autopostback is on....
3
1435
by: PJ6 | last post by:
When I have client-side script like this - document.forms.submit('test') how do I access, from server-side code, the value I put in the submit method? Also, is it possible to get the...
3
2416
by: Dabbler | last post by:
How do I tell wether I'm seeing autopostback vs submit button click in Page_load? Thanks for any clues.
7
2057
by: Bjorn Sagbakken | last post by:
Hello. There maybe an simple answer to this, but sometimes one get a strange blindness when working intensely on one single problem. I'm using ASP.NET 2003, building pages that include 3 user...
0
2122
by: =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= | last post by:
I'm having trouble working with a Summary Validation control. I need to click my submit button twice for the Summary to display when validation errors occur on the page. Background: My page...
0
764
xarzu
by: xarzu | last post by:
OK, this must be a very very simple question for ASP programmers to answer. After I have gathered all the information I want from the user and after the user has clicked on a submit button, how do...
0
7202
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
7086
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
7280
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
7330
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...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7460
tracyyun
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...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.