Problems wit events

ASP.NET

    Next

  • 1. Why do my events not fire?
    Not to worry - discovered the problem. I was changing the children control's ID's before render but after init. so the controls that were generating the command events were called something different when they raised the events than when they were meant to be receiving the events. "Jason" < XXXX@XXXXX.COM > wrote in message news: XXXX@XXXXX.COM ... > I've done this before countless times and everytime I have hassles hooking > events in my controls - for a while I thought I had it sussed. But for some > reason this control never calls button_Command > > Any and all help is much appreciated. > -jason. > > > >
  • 2. Rearranging controls
    Hi, i am developing a user control that consists of different listboxes. The control needs the ability to arrange those listboxes in a different order, depending on a property established during design. How can i achieve this? Thx :)
  • 3. Open popup aspx page
    Hi, I have a usercontrol with a button. In the button's click event I have to open an instance of an aspx page, passing some values to some public variables of the page. How can I call the instance of the right page? The code is the follow: //this is the webpage LookUpWebForm LUWF = new LookUpWebForm //these are the variables valued LUWF.TabellaDB = m_DBTable; LUWF.IDLookUp = ID; LUWF.PageSize = PageSize; i need to open the LookUpWebForm's aspx file in this way: BtnLookUp.Attributes.Add("onclick", "window.open('AreaITControls/LookUpWebForm.aspx');") but, in the LookUpWebForm's PageLoad event the variables are not setted. Thank you Alessandro Rossi
  • 4. Questions about embedded winControl
    Hi group, i have 2 questions i hope somebody can answer about a wincontrol being hosted in ie. 1. Is it possible to create a pop up that prompts for a user name and password when a button on my control is clicked? 2. Why are there no tooltips for controls in a wincontrol library project? is there a way to get this functionality? through an implements call or inheritance maybe? thanks Steve
  • 5. Any lists of best windows controlls for dotnet?
    Looking for general suggestions for various components. Windows GUI controls. Security and Config controls. Etc. I recently got an email to vote for my favorite commercial .net controls for some magazine's website. Unfortunately I tossed the msg. I'm looking for the results of that kind of thing. Just some pointers in the direction of best of breed controls. Thanks -Bill

Problems wit events

Postby Norbeto Mesen » Fri, 10 Oct 2003 07:45:56 GMT

Hi, everybody


I have a problem with the events in a web page.
I have a botton with a method that should execute a method on mouse click
but for some reason (that I don't know) it is executing the page_Load before
the method call, WHY?
    What I need is that the method be called before any event and If its
possible to cancel the Page_Load, or where else I can set this code in the
button.  This is what I have. The Page_Load always gets fired when I click
onm btnBuscar. Any ideas.

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
    If IsPostBack Then
    End If
End Sub


Private Sub btnBuscar_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnBuscar.Click
Dim condicion As String
condicion = ""
PrepareCondition(Page, condicion)
If condicion.Length <> 0 Then
condicion = " WHERE " & condicion.Substring(4)
End If
Session("tcWhere") = condicion
Response.Redirect("frmMansgrPoliza.aspx")
End Sub

Also I have another problem if i refresh the page with F5 function key, the
click event on the botton always gets re-executes.


Thanks ahead,
Norberto





Problems wit events

Postby Rich Mercer » Fri, 10 Oct 2003 18:01:48 GMT

The Page_Load event is always called before any control 
event.  Try placing your Page_Load code into a method and 
call the method from Page_Load using the IsPostBack 
property to only call it on the first page load then you 
can call it from your controls event if you need to but 
it wont execute after a post back.

HTH.

Rich Mercer
MCAD

method on mouse click
the page_Load before
event and If its
set this code in the
fired when I click
ByVal e As
System.Object, ByVal e As
F5 function key, the

Re: Problems wit events

Postby Norberto Mes Lez » Sat, 11 Oct 2003 02:37:42 GMT

Thank for your help

But I Also I have another problem if i refresh the page with  F5 function
key, the click event on the botton always gets re-executes.

Thanks ahead,
Norberto










Similar Threads:

1.Problem with User Control and unset references to controls wit

Thx for reply,

i should have said, declaratively

e.g.

<body MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
				<Nc:ItemDataList ID="MyItemDataLisy" runat="server"></Nc:ItemDataList>

		</form>
	</body>
-- 
TIA
Sam Martin


" XXXX@XXXXX.COM " wrote:

> Hi,
> 
> How are did you load the user control - declaratively or
> programmatically?
> 
> Regards.
> 
> 

2.Problems wit Databinding to a DropDown box

Hello,

I have done the following to bind data to a DropDown box:

1. Drag SQLServer table onto web form to create data connection and data
adapter.

2. Generate dataset by right-clicking on the data adapter ad selecting
generate dataset.

3. Setting the drop down box propertied to reflect so that:

Datasource = Dataset11
Datamember = table
Datatextfield = tablerow
Datavaluefield = tablerow

When I run the application I don't generate any errors, but no data is
present in the DropDown box...Well, actually I get a drop down that is
blank.

Any ideas an what Imay be doing wrong?

Also, if I code the information, can I put it in the CodeBehind file or does
it have to be in the actual ASPX?

Thanks in advance,
Kris


3.Problem wit .NET forms

Hi all,
starting from about a week ago I have strange behavoir of VS2003. All .NET 
forms in designers are loading very slow (about 5 min) and the processor 
load goes to 100%. I can't remember to change something in the options or 
installing something unusual (may be just testet CLR Spy,which is now 
disabled).
May be anybody has an idea what it could be.
Thanks,Boni 


4.Problem wit std::string::substr

Hi all,
Following code causes strAddress to contain garbage data.
When I decrease number of characters that appear before '\\' then everything
is ok.
12 chars before '\\' seems to be a magic number.
I have compiled it with VisualStudio 2003.
Any ideas?

std::string strAddress = "123456789012\\aaaaa";
std::string::size_type pos = strAddress.find('\\');
if( pos != std::string::npos )
{
    strAddress = strAddress.substr( pos + 1, 2 );
}

Thanks in advance for any help.
Jarek


5.Help Please Wit Error

Hey Guys,

I trying to create an application that uses an OLEDBConnection.
Every time I try to run my app when I get to the opening of the 
connection I get this error.

"The .Net Framework Data Providers require Microsoft Data Access 
Components (MDAC).  Please install Microsoft Data Access Components 
(MDAC) version 2.6 or later."

I have downloaded the latest version of MDAC (2.7) and installed it but 
i still get the same error. I downloaded this utility from MS and its 
supposed to check which version of MDAC i have installed and it says I 
have all of them installed from 2.1 to 2.8 sp1. It doesn make any 
sense, I have used this type of connection before but i have formatted 
since so I not sure if there is some little setting that i missed or 
if i just got lucky last time. Any input will be greatly appreciated so 
thx in advance.

-	Adam

P.S.
I am running Windows XP Pro SP2 with Visual Studio .NET 2003 & Visual 
Studio .NET 2005 Beta 2. I had the same problem without VS.NET 2005 
installed I was kind of hoping that hen I installed VS.NET 2005 it would 
fix my problem but it didn.

6. How to combine Asp.net wit hms.exel ?

7. At my wits end

8. At wit's end...



Return to ASP.NET

 

Who is online

Users browsing this forum: No registered users and 18 guest