SitePoint Sponsor

User Tag List

Results 1 to 17 of 17
  1. #1
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,880
    Mentioned
    48 Post(s)
    Tagged
    0 Thread(s)

    Buttons do not work

    Hey guys

    I just created a .aspx page as usual in visual web developer 2005. I created buttons like I normally do. The go into design view double click on them and it creates a click event and takes u to it in the code behind page. I put my code in there, but wen I click any of the buttons, it does nothing. It does not post back at all. Any ideas y this is happening?

    Thanks

  2. #2
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,880
    Mentioned
    48 Post(s)
    Tagged
    0 Thread(s)
    Hey guys

    I figured it out! Its this retarded atlas stuff. Its starting to work on my nerves. Every button thats in an atlas update panel doesnt work or post back at all. As soon as I take it out the update panel it works! What is up with atlas?

    What is wrong with this code:

    Code:
    <atlas:ScriptManager runat="server" ID="atlasManager" EnablePartialRendering="true"></atlas:ScriptManager>
    
    
    <atlas:UpdatePanel runat="server" ID="updUsernameCheck">
    												    <ContentTemplate>
    												    <asp:button id="btnCheck" Runat="server" Text="available?" Width="71px" CausesValidation="False" OnClick="btnCheck_Click"></asp:button>&nbsp;
    												    <asp:label id="lblYES" Runat="server" Font-Size="Medium" ForeColor="#00C000" Visible="False">YES</asp:label>
    												    </ContentTemplate>
    												    </atlas:UpdatePanel>
    Thanks

  3. #3
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Add a Mode="Conditonal" and a Triggers to the update panel.

  4. #4
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,880
    Mentioned
    48 Post(s)
    Tagged
    0 Thread(s)
    Hey wwb

    Ok, i did this:
    Code:
    <asp:button id="btnCheck" Runat="server" Text="available?" Width="71px" CausesValidation="False" OnClick="btnCheck_Click"></asp:button>&nbsp;
    												    <atlas:UpdatePanel runat="server" ID="updUsernameCheck" Mode="Conditional">
    												        <Triggers>
    												            <atlas:ControlEventTrigger ControlID="btnCheck" EventName="Click" />
                                                            </Triggers>
    												        <ContentTemplate>
    												            <asp:label id="lblYES" Runat="server" Font-Size="Medium" ForeColor="#00C000" Visible="False">YES</asp:label>
    												        </ContentTemplate>
    												     </atlas:UpdatePanel>
    what is the problem with it? Coz it still does exactally the same thing!

  5. #5
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    The triggering button needs to be inside the ContentTemplate . . .

  6. #6
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,880
    Mentioned
    48 Post(s)
    Tagged
    0 Thread(s)
    Nope, still doesnt work! I dnt no y this shud be so difficult. Ive used atlas how many times before and its never done this.

    And I do have the latest atlas extensions etc.

  7. #7
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Latest as in the Beta 1 that went up on Friday? If so, I think some things might have changed. I would double check the docs.

  8. #8
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,880
    Mentioned
    48 Post(s)
    Tagged
    0 Thread(s)
    Ok cool. Thanks, i will look into that.

  9. #9
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm having kinda same problem. I've got two pages so far using an UpdatePanel. One of the pages works perfectly! However, on the other page, nothing seems to work! On the second page I'm using CollapsiblePanelExtender (x3) and HoverMenuExtender within the UpdatePanel, so I thought they might have something to do with the buttons not working. I removed them and it made no difference. Infact, I moved some of the code onto the other page that uses both the Extenders and they worked perfectly!

    I've tried setting both types of triggers (async and psotback), not set any (the page that works doesn't have any defined) and still nothing happens! I'm gonna jump over the the ASP.NET forums and see if anyone else has come across this. Will post anything I find...

  10. #10
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Something I didn't mention: I've got the scriptmanager control in the masterpage, I tried moving this to the content pages, and it didn't make a difference

  11. #11
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok... I got it working... I created a new page and copied everything over one section at a time and it all worked ok! Can't work out whats changed, very strange!

  12. #12
    SitePoint Member
    Join Date
    May 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure you use the

    EnablePartialRendering="true

    in the scriptManager.

  13. #13
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Had that

  14. #14
    SitePoint Member
    Join Date
    May 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you post the old page code. I had fun with this one when I started this project that I am on. I am using ATLAS mainly for the feel of a windows application.

  15. #15
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fraid not, got rid of it all. But it's the extact same as the one thats working, I'll post it anyway. It's still a loooong way from finished tho:
    Code:
     <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Post.aspx.cs" Inherits="e4admin_Post" Theme="AdminDefault" MasterPageFile="~/Admin.master" %>
     <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="Atlas" %>
     <%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>
     
     <asp:Content ID="Content1" ContentPlaceHolderID="cphMain" Runat="Server">
     	
     	<asp:UpdatePanel ID="upnlGrid" runat="server">
     		<ContentTemplate>
     			<asp:GridView ID="GridView1" runat="server" DataSourceID="PostDS">
     			</asp:GridView>
     		</ContentTemplate>
     	</asp:UpdatePanel>
     	
     	<asp:UpdatePanel ID="upnlForm" runat="server">
     		<ContentTemplate>
     			<asp:Label ID="lblMessages" runat="server"></asp:Label>
     			<fieldset>
     				<legend>Post</legend>
     				<asp:Label ID="lblPostId" runat="server" AssociatedControlID="txtPostId" CssClass="first">
     					PostId
     					<asp:TextBox ID="txtPostId" runat="server" Enabled="false"></asp:TextBox>
     				</asp:Label>
     				<asp:Label ID="lblTitle" runat="server" AssociatedControlID="txtTitle">Title
     					<asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
     				</asp:Label>
     				<asp:Label ID="lblContent" runat="server" AssociatedControlID="txtContent">Content
     					<FTB:FreeTextBox ID="txtContent" runat="server">
     					</FTB:FreeTextBox>
     				</asp:Label>
     				<asp:Panel ID="pnlExcerptHeader" runat="server" CssClass="pnlExpanderHeader">
     					Excerpt <em>(Optional)</em>
     					<asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/AdminDefault/images/admin/expand.jpg" />
     				</asp:Panel>
     				<asp:Panel ID="pnlExcerpt" runat="server" CssClass="pnlBody">
     					<asp:TextBox ID="txtExcerpt" runat="server" Height="150px" TextMode="MultiLine" Width="99%"></asp:TextBox>
     				</asp:Panel>
     				<asp:Panel ID="pnlStatusHeader" runat="server" CssClass="pnlExpanderHeader">
     					Status
     					<asp:Image ID="Image2" runat="server" ImageUrl="~/App_Themes/AdminDefault/images/admin/expand.jpg" />
     				</asp:Panel>
     				<asp:Panel ID="pnlStatus" runat="server" CssClass="pnlBody">
     					<fieldset class="radio">
     						<asp:RadioButtonList ID="rblStatus" runat="server" DataSourceID="StatusDS" CssClass="radio"
     							DataTextField="Title" DataValueField="StatusId" RepeatLayout="Flow" OnDataBound="rblStatus_DataBound">
     						</asp:RadioButtonList>
     					</fieldset>
     				</asp:Panel>
     				
     				<asp:Panel ID="pnlTagsHeader" runat="server" CssClass="pnlExpanderHeader">
     					Tags
     					<asp:Image ID="Image3" runat="server" ImageUrl="~/App_Themes/AdminDefault/images/admin/expand.jpg" />
     				</asp:Panel>
     				<asp:Panel ID="pnlTags" runat="server" CssClass="pnlBody">
     					<asp:GridView id="gvPostTags" runat="server">
     					</asp:GridView>
     					<asp:TextBox ID="txtTag" runat="server"></asp:TextBox>
     					<asp:LinkButton ID="lbAddTag" runat="server" Text="Add" OnClick="lbAddTag_Click"></asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;<asp:Image ID="imgTagHelp" runat="server" ImageUrl="~/App_Themes/AdminDefault/images/admin/Help.png" />
     					<asp:GridView ID="rptTags" runat="server" DataSourceID="TagsDS">
     					</asp:GridView>
     					<asp:Label ID="lblTagHelp" runat="server" CssClass="helpHover">Separate each tag with a space or to join 2 words together in one tag, use double quotes.</asp:Label>
     				</asp:Panel>
     			</fieldset>
     			
     			<Atlas:HoverMenuExtender 
     				ID="HoverMenuExtender1" runat="server" 
     				TargetControlID="imgTagHelp" 
     				PopupControlID="lblTagHelp" 
     				OffsetX="20" OffsetY="-5">
     			</Atlas:HoverMenuExtender>
     			
     			<Atlas:CollapsiblePanelExtender ID="cpeExcerpt" runat="Server" TargetControlID="pnlExcerpt"
     				ExpandControlID="pnlExcerptHeader" CollapseControlID="pnlExcerptHeader" ScrollContents="False"
     				ExpandDirection="Vertical" SuppressPostBack="true" CollapsedImage="~/App_Themes/AdminDefault/images/admin/expand.jpg"
     				ExpandedImage="~/App_Themes/AdminDefault/images/admin/collapse.jpg" ImageControlID="Image1"
     				Collapsed="true">
     			</Atlas:CollapsiblePanelExtender>
     			<Atlas:CollapsiblePanelExtender ID="cpeStatus" runat="Server" TargetControlID="pnlStatus"
     				ExpandControlID="pnlStatusHeader" CollapseControlID="pnlStatusHeader" ScrollContents="False"
     				ExpandDirection="Vertical" SuppressPostBack="true" CollapsedImage="~/App_Themes/AdminDefault/images/admin/expand.jpg"
     				ExpandedImage="~/App_Themes/AdminDefault/images/admin/collapse.jpg" ImageControlID="Image2"
     				Collapsed="true">
     			</Atlas:CollapsiblePanelExtender>
     			<Atlas:CollapsiblePanelExtender ID="cpeTags" runat="Server" TargetControlID="pnlTags"
     				ExpandControlID="pnlTagsHeader" CollapseControlID="pnlTagsHeader" ScrollContents="False"
     				ExpandDirection="Vertical" SuppressPostBack="true" CollapsedImage="~/App_Themes/AdminDefault/images/admin/expand.jpg"
     				ExpandedImage="~/App_Themes/AdminDefault/images/admin/collapse.jpg" ImageControlID="Image3"
     				Collapsed="true">
     			</Atlas:CollapsiblePanelExtender>
     			
     		</ContentTemplate>
     	</asp:UpdatePanel>
     	
     	<asp:ObjectDataSource ID="PostDS" runat="server" DataObjectTypeName="e4ums.Blog.Business.Posts.Post"
     		DeleteMethod="Delete" InsertMethod="Save" OldValuesParameterFormatString="original_{0}"
     		SelectMethod="LoadAll" TypeName="e4ums.Blog.Business.Posts.Post" UpdateMethod="Save">
     	</asp:ObjectDataSource>
     	<asp:ObjectDataSource ID="StatusDS" runat="server" UpdateMethod="Save" TypeName="e4ums.Blog.Business.Statuses.Status"
     		SelectMethod="LoadAll" OldValuesParameterFormatString="original_{0}" InsertMethod="Save"
     		DeleteMethod="Delete" DataObjectTypeName="e4ums.Blog.Business.Statuses.Status">
     		<DeleteParameters>
     			<asp:Parameter Type="Int32" Name="statusId"></asp:Parameter>
     		</DeleteParameters>
     	</asp:ObjectDataSource>
     	<asp:ObjectDataSource ID="TagsDS" runat="server" DataObjectTypeName="e4ums.Blog.Business.Tags.ITag"
     		DeleteMethod="Delete" InsertMethod="Save" OldValuesParameterFormatString="original_{0}"
     		SelectMethod="LoadAll" TypeName="e4ums.Blog.Business.Tags.Tag" UpdateMethod="Save">
     	</asp:ObjectDataSource>
     </asp:Content>

  16. #16
    SitePoint Member
    Join Date
    May 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your code looks good from here. One of those strange events.

  17. #17
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,880
    Mentioned
    48 Post(s)
    Tagged
    0 Thread(s)
    Hey dhtmlgod.

    Yea, this problem sounds very strange. I also tried what u did. I created a new page and copied it across 1 section at a time, but mine did still not work. But now the page works 100% with no atlas update panels.

    Oh well. Post back here if the guys at asp.net get back to u.

    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •