473,569 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Button in UserControl Question

The SignOut() button below doesn't fire if in a UserControl but if i move it
to an ASPX page it fires..
It seems i can't get access to the SUB in the USERCONTROL.
Am i missing something?
Any ideas?
I have a userControl below:-
----------------------------
<%@ Control CodeBehind="_He ader.ascx.vb" Language="vb"
AutoEventWireup ="false" Inherits="Test. C_Header" %>
<td align="center" width="65">
<input id="cmdSignOut " type="submit" Value="Sign Out"
runat="server" onserverclick=" SignOut"
NAME="cmdSignOu t">
In usercontrol codebehind i have:-
---------------------------------
Protected WithEvents cmdSignOut As
System.Web.UI.H tmlControls.Htm lInputButton
Sub SignOut(ByVal objSender As Object, ByVal objArgs As EventArgs) Handles
cmdSignOut.Serv erClick

'System.Web.Sec urity.FormsAuth entication.Sign Out()
'Response.Redir ect(Request.Url Referrer.ToStri ng())
'Response.Write ("asdsadas")
Response.Redire ct("logout.aspx ")
End Sub
Nov 19 '05 #1
0 836

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

Similar topics

3
2429
by: Scott Schade | last post by:
I have a form onto which I add a control during execution. The control is a control that I wrote. The control has a number of controls on it. I would like to click on a button on the control and execute a function on the form. Is this possible? Thanks, Scott
7
8553
by: Derrick | last post by:
Didn't there used to be some property where you could set a button to be the "default" so that if a user pressed enter with any control in focus, the button would still get the click event? Some way you could set it as the "cancel" button too, wasn't there? Anyway, can you do this with windows forms button? Thanks in advance! Derrick
4
14469
by: athlonman | last post by:
Hi all!! II'm trying to set the Text of a TextBox in "Form1" when I click a Button in a UserControl. My code is: : public class Form1 : System.Windows.Forms.Form { public System.Windows.Forms.TextBox textBox1; private WindowsApplication1.UserControl1 userControl11;
0
1406
by: Pingo | last post by:
Hi! How do I handle a Page event in my UserControl. My .aspx page contain 5 different buttons and one of them is the SAVE button. All buttons do PostBack to the page but only one should Save the data in the forms. I want my UserControl to know when the SAVE button is clicked. example:
1
239
by: sotto | last post by:
Hi, how can i make a usercontrol that inherits from the system.windows.forms.button instead of the forms.usercontrol ? I want to add a fiew features to my button and still be able to drag it on to the form with the ide i got working code, just a class that inherits from system.windows.forms.button but then i need to do all the design...
4
1819
by: xkeops | last post by:
I'm working in VS2003 VB.NET environment. I created a based class template (BasePage) and there is a new aspx win form (winform1.aspx) inheriting BasePage. In winform1.aspx I have added a new usercontrol uc1 and in uc1 I have a textbox and a save button (btn_Save). When I click the save button the btnSave_Click event doesn't fire.
3
5139
by: pearcewg | last post by:
All: I have a page with a form and fields on the form (checkboxes, grids, etc). This form contains a usercontrol which has a dynamic navigational menu of buttons. When a user clicks on one of the buttons in the usercontrol, it is intended to save the updates information on the parent form. This is done using a delegate/callback function...
0
1420
by: stimul8d | last post by:
Before i get flamed, this isn't the usual question you see left right and center. I'm dynamically creating usercontrols inside the page_init event and setting the ID's of each control so that the events survive postback. in the user control i have a datagrid which uses the old databinding events (updating, editing etc,...). Here's the problem,...
1
1296
by: Nick Verlinden | last post by:
Hi there, i'm trying to accomplish the following (however searching the net for days now, without result): As you know you have a asp button: <asp:Button ID="test" Text="Test" OnClick="Test_Button_Click"> this will launch the method "Test_Button_Click" on the server side. As i find the built in OS buttons ugly, i designed some new...
0
7700
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, 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...
0
7614
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...
0
8125
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7676
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
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 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...
0
6284
agi2029
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...
0
3653
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2114
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 we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.