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

Handling PostBacks in UserControls, __doPostBack() ?

Howdy,

I'm writing a User Control that will operate like windows explorer (file
browing through directories) I'm making it so it will have the ability to
delete files as well, and to do that I'm going to associate an image next to
the filename that you click, that will raise a "delete" event. There could
be from 0 to 100+ of these images based on the number of files in a given
subdirectory.

I'd want to handle this delete event within the user control itself, but i'm
unsure where to begin as far as setting these images to cause a postback
when you click them. I would assume I can tap into what asp.net does with
their controls, tapping into the __doPostBack function. I'm not sure if I
need to manually call __doPostBack, or is there something I can use so
asp.net would write this out for me.

Any help would be appreciated!
--Michael
Nov 18 '05 #1
1 2210
The following method will create the __doPostBack javascript for a specific control.

Page.GetPostBackClientEvent

Tommy,

"Michael Ramey" <raterus@localhost> wrote in message news:<O5**************@TK2MSFTNGP09.phx.gbl>...
Howdy,

I'm writing a User Control that will operate like windows explorer (file
browing through directories) I'm making it so it will have the ability to
delete files as well, and to do that I'm going to associate an image next to
the filename that you click, that will raise a "delete" event. There could
be from 0 to 100+ of these images based on the number of files in a given
subdirectory.

I'd want to handle this delete event within the user control itself, but i'm
unsure where to begin as far as setting these images to cause a postback
when you click them. I would assume I can tap into what asp.net does with
their controls, tapping into the __doPostBack function. I'm not sure if I
need to manually call __doPostBack, or is there something I can use so
asp.net would write this out for me.

Any help would be appreciated!
--Michael

Nov 18 '05 #2

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

Similar topics

4
by: Ben Barter | last post by:
We have found a fundemental problem with the way that postbacks are handled. We have a page that has about 60 postback controls that are posted back to the server when the user clicks a link...
5
by: Dave | last post by:
(Second Try) Greetings, I have an asp.net web application that utilizes a User Control at the top of the page. My User Control contains a Server Control menu which will require postbacks. ...
0
by: Pete | last post by:
I am building an ASP.NET application and have just encountered something very strange which I would like explained if possible. In BaseForm.ascx I have the following <form> element: <form...
2
by: SMAccount | last post by:
According to Microsoft, The Page.RegisterRequiresPostBack Method "Registers a control as one that requires post-back handling." Is "post-back handling", something that the Page Does? Is...
1
by: Frankie | last post by:
Just doing some testing here to see what happens when JavaScript is disabled. I was told somewhere along the line that PostBacks would fail because they rely on JavaScript: function...
12
by: scsharma | last post by:
Hi, I am working on creating a webapplication and my design calls for creating main webform which will have menu bar on left hand side and a IFrame which will contain all the forms that are shown...
9
by: J055 | last post by:
Hi I have a very simple configuration of the GridView with paging and sorting. When I do a postback the DataBinding event fires twice - in both the ProcessPostData and PreRender stages of the...
1
by: Gummy | last post by:
Hello, I am loading several user controls dynamically in OnInit() like this: ucListBoxSelections ucLocation = (ucListBoxSelections)LoadControl("UserControls/ucListBoxSelections.ascx");
2
by: =?Utf-8?B?TWFyaw==?= | last post by:
I am writing a control and want to handle an OnClick event on the client-side before then conforming to the postback mechanism. I have got the server-side events working for my OnClick event by...
1
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.