Search Results

Search found 236 results on 10 pages for 'linkbutton'.

Page 5/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • How to use an UpdatePanel inside a Reapeater ItemTemplate with a HTML Table

    - by vanslly
    I want to allow the user to edit by data by row, so only need content updated by row. I managed to achieve this by using a Repeater with a UpdatePanel in the ItemTemplate. Using a div <asp:ScriptManager ID="ctlScriptManager" runat="server" /> <asp:Repeater ID="ctlMyRepeater" runat="server"> <ItemTemplate> <div> <asp:UpdatePanel ID="ctlUpdatePanel" runat="server"> <ContentTemplate> <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>' /> <asp:LinkButton ID="btnRename" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="Rename">Rename...</asp:LinkButton> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnRename" EventName="Click" /> </Triggers> </asp:UpdatePanel> </div> </ItemTemplate> </asp:Repeater> But, I want to use a table to ensure structure and spacing and CSS styling wasn't doing it for me, but when I use a table everything goes whacky. Using a Table <asp:ScriptManager ID="ctlScriptManager" runat="server" /> <table> <asp:Repeater ID="ctlMyRepeater" runat="server"> <ItemTemplate> <asp:UpdatePanel ID="ctlUpdatePanel" runat="server"> <ContentTemplate> <tr> <td> <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>' /> </td> <td> <asp:LinkButton ID="btnRename" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="Rename">Rename...</asp:LinkButton> </td> </tr> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnRename" EventName="Click" /> </Triggers> </asp:UpdatePanel> </ItemTemplate> </asp:Repeater> </table> What's the best way to solve this problem? I prefer using a table, because I really want to enfore structure without reliance on CSS. Thanks in advance.

    Read the article

  • link button property to open in new tab?

    - by Surya sasidhar
    hi, in my application i have some link buttons there but when i right click on them i not(they are in disable mode) found property open in new tab or open in new window, what is that property can u help me. thank you <asp:LinkButton id="lbnkVidTtile1" runat="Server" CssClass="bodytext" Text='<%# Eval("newvideotitle") %>' ></LinkButton>

    Read the article

  • Removing a querystring from url in asp.net

    - by user279521
    HI, I need to remove a querystring when a user clicks a particular LinkButton. So for example if the querystring is http://UserProfileManager.com?UserID=1234 .... when the user clicks on the Linkbutton, I want the url to be http://UserProfileManager.com. The issue is that everything is on one page, and I am using Any ideas would be appreciated.

    Read the article

  • how to: get rid of __doPostBack from link buttons?

    - by b0x0rz
    for example: this code: <asp:LinkButton ID="SignInLinkButton" runat="server" CssClass="SignInLinkButton" TabIndex="3" OnClick="AuthorizeUser">SignIn</asp:LinkButton> shows this as link in status bar: javascript:__doPostBack('ctl00$ctl00$GlobalPageContentPlaceHolder$ManagePageContentPlaceHolder$SignInLinkButton','') is there a chance o get rid of this ugliness? or is there a better way of doing this, that does not generate this insanity? i searched, but did not find an answer, so links are also cool. thnx

    Read the article

  • FLEX: how to correctly pass the link to a page ?

    - by Patrick
    hi, I'm using <mx:LinkButton click="navigateToURL(new URLRequest(event.currentTarget.label.toString()))" /> to open a browser window to display the website on the label of my LinkButton. However I cannot correctly pass the link.. you see the problem: file://localhost/..myapp/bin-debug/www.google.com thanks

    Read the article

  • How to pass Button.Click into a function?

    - by Achilles
    I have a function that adds eventhandlers to control events. Right now I have several overloads that add events to different types of controls: Public Sub AddEventHandler(Button, ButtonEvent) 'adds event handling for Button.Click public Sub AddEventHandler(LinkButton, ButtonEvent)'adds event handling for LinkButton.Click The problem is I want to write a function that is more robust like: Public sub AddEventHandler(Control, EventToHandle, ControlEvent) where EventToHandle is the parameter representing Button.Click or whatever event that Button has associated with it. Any suggestions guys? Thanks!

    Read the article

  • Exception when creating MailMessage

    - by Julien Poulin
    I'm getting a FormatException telling me the address '[email protected]' is invalid (I'm guessing because of the '-'). Here is the code I'm using: var md = new MailDefinition(); md.BodyFileName = physicalPath; md.Subject = subject; md.From = from; md.CC = cc; md.IsBodyHtml = true; MailMessage mailMessage = md.CreateMailMessage(to, replacements, owner); Is there a bug in the .Net e-mail parser? I am sure this address is valid since it belongs to a friend and I have no problem sending and receiving his e-mails with Outlook. Is there a way to fix this? EDIT: Here is the stacktrace: [FormatException: La chaîne spécifiée n'est pas de la forme requise pour une adresse de messagerie.] System.Net.Mime.MailBnfHelper.ReadMailAddress(String data, Int32& offset, String& displayName) +1141755 System.Net.Mail.MailAddress.ParseValue(String address) +240 System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding) +85 System.Net.Mail.Message..ctor(String from, String to) +122 System.Net.Mail.MailMessage..ctor(String from, String to) +114 System.Web.UI.WebControls.MailDefinition.CreateMailMessage(String recipients, IDictionary replacements, String body, Control owner) +1366 System.Web.UI.WebControls.MailDefinition.CreateMailMessage(String recipients, IDictionary replacements, Control owner) +290 WebNotificationManager.CreateMessage(Page owner, MessageTemplate messageTemplate, ListDictionary replacements, String to, String from, String cc, String subject) in c:\dev\SoccerMania\SoccerMania\App_Code\WebNotificationManager.cs:41 WebNotificationManager.SendMessage(Page owner, MessageTemplate messageTemplate, ListDictionary replacements, String to, String subject) in c:\dev\SoccerMania\SoccerMania\App_Code\WebNotificationManager.cs:22 inscription.bInscription_Click(Object sender, EventArgs e) in c:\dev\SoccerMania\SoccerMania\Inscription.aspx.cs:54 System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +111 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +79 System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

    Read the article

  • UpdatePanel doesn't do partial-page update, and IsInAsyncPostBack is always false

    - by Joseph Anderson
    I'm attempting to use an UpdatePanel, but can't get partial-page updates to work. When I look at the ScriptManager's IsInAsyncPostBack property, it's always false. Here's a page that reproduces the issue. It has a ScriptManager, an UpdatePanel, a LinkButton within the update panel, and a Button wired up to the UpdatePanel via the Triggers collection. <%@ Page Language="C#" %> <script runat="server"> protected void Page_Load(object sender, EventArgs e) { Label1.Text = DateTime.Now.ToString(); if (IsPostBack) Label1.Text += " - Postback!"; if (ScriptManager1.IsInAsyncPostBack) Label1.Text += " - Async!"; } </script> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server" /> <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server"> <ContentTemplate>Panel 1:<asp:Label runat=server ID=Label1 /><br /> <asp:LinkButton runat=server ID="LinkButton1" Text="Update!"></asp:LinkButton></ContentTemplate> <Triggers><asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" /></Triggers> </asp:UpdatePanel> <asp:Button ID="Button1" Text="Refresh Panel 1" runat="server" UseSubmitBehavior=false /> </form> </body> </html> If I run this code and click on either of the buttons, I see "Panel 1:2/8/2010 3:38:41 PM - Postback!" I expected that clicking either button would cause a partial-page update for UpdatePanel1, that IsInAsyncPostBack would be true, and that " - Async!" would be appended to Label1. Any idea why IsInAsyncPostBack is always false?

    Read the article

  • Setting up a button to trigger both modalPopupExtender and his Click Method

    - by Vitor Reis
    Hey guys, I have this modalPopupExtender, I want it to show a CheckBoxList with some data. I have set up a button to call both the method to fill the CheckBoxes and trigger the modalPopup (TargetControlID). they're all inside an UpdatePanel. with the right triggers. The problem is that when I click the button it shows the modalPopup but doesn't load the method to fill my CheckBoxes... Also, a linkButton inside the poup (linkButtonCheckAll) just closes the popup when clicked. When I remove the modalPopup the code works just fine and the list is loaded dinamically with the UpdatePanel. <asp:UpdatePanel ID="uppLote" runat="server"> <ContentTemplate> <ajaxToolkit:ModalPopupExtender ID="modalLote" runat="server" BehaviorID="popup" TargetControlID="buttonViewLote" PopupControlID="panelLote" /> <asp:Panel ID="panelLote" runat="server" CssClass="modalpopup"> <asp:LinkButton ID="linkButtonCheckAll" runat="server" Text="Check All Items" onclick="linkButtonCheckAll_Click"></asp:LinkButton> <asp:CheckBoxList ID="checkListLote" runat="server"> </asp:CheckBoxList> </asp:Panel> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="linkButtonViewLote" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="linkButtonCheckAll" EventName="Click" /> </Triggers> </asp:UpdatePanel> If I completely remove the modalPopupExtender, the code works fine, showing me the list I want with the method "linkButonViewLote_Click" (so, the problem is occurring due to the button triggering the modalPopupExtender is the same that I'm using to get my data, right? Any solutions?

    Read the article

  • FLEX: the custom component is still a Null Object when I invoke its method

    - by Patrick
    Hi, I've created a custom component in Flex, and I've created it from the main application with actionscript. Successively I invoke its "setName" method to pass a String. I get the following run-time error (occurring only if I use the setName method): TypeError: Error #1009: Cannot access a property or method of a null object reference. I guess I get it because I'm calling to newUser.setName method from main application before the component is completely created. How can I ask actionscript to "wait" until when the component is created to call the method ? Should I create an event listener in the main application waiting for it ? I would prefer to avoid it if possible. Here is the code: Main app ... newUser = new userComp(); //newUser.setName("name"); Component: <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100" height="200" > <mx:Script> <![CDATA[ public function setName(name:String):void { username.text = name; } public function setTags(Tags:String):void { } ]]> </mx:Script> <mx:HBox id="tagsPopup" visible="false"> <mx:LinkButton label="Tag1" /> <mx:LinkButton label="Tag2" /> <mx:LinkButton label="Tag3" /> </mx:HBox> <mx:Image source="@Embed(source='../icons/userIcon.png')"/> <mx:Label id="username" text="Nickname" visible="false"/> </mx:VBox> thanks

    Read the article

  • ColorBox (jquery plug in) my textbox values are empty after postback

    - by UshaP
    Hi, I'm having trouble getting the values from text box when using ColorBox http://colorpowered.com/colorbox/ I have a form that opens a ColorBox modal dialog.In the modal i have a asp.net textbox and a button when i click the button i'm getting the postback but the value of the textbox is always empty. <script type="text/javascript"> $(document).ready(function () { $(".example8").colorbox({ width: "50%", inline: true, href: "#inline_example1" }); }); </script> .... <form id="form1" runat="server"> <a href="content/ohoopee1.jpg" rel="example8" title="abc">Click here</a></p> <a class='example8' href="#">Inline HTML</a></p> <!-- This contains the hidden content for inline calls --> <div style='display: none'> <div id='inline_example1' style='padding: 10px; background: #fff;'> <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">LinkButton</asp:LinkButton><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> </div> </div> </form> Any help will be appreciated. Thanks.

    Read the article

  • Explicit localization problem

    - by X-Dev
    when trying to translate the confirmation message to Norwegian i get the following error: Cannot have more than one binding on property 'OnClientClick' on 'System.Web.UI.WebControls.LinkButton'. Ensure that this property is not bound through an implicit expression, for example, using meta:resourcekey. i use Explicit localization in the following manner: <asp:LinkButton ID="lnkMarkInvoiced" runat="server" OnClick="lnkMarkInvoiced_OnClick" OnClientClick="<%# Resources: lnkMarkInvoicedResource.OnClientClick%>" Visible="False" CssClass="stdtext" meta:resourcekey="lnkMarkInvoicedResource" ></asp:LinkButton> here's the local resource file entry: <data name="lnkMarkInvoicedResource.OnClientClick" xml:space="preserve"> <value>return confirm('Er du sikker?');</value> if i remove the meta attribute i get the English text(default). how do i get the Norwegian text appearing without resorting to using the code behind? Update: removing the meta attribute prevents the exception from occurring but the original problem still exists. I can't get the Norwegian text to show. only the default English text shows. Another Update: I know this question is getting old but i still can't get the Norwegian text to display. If anyone has some tips please post a response.

    Read the article

  • Custom control doesn't fire validation

    - by Ed Woodcock
    I've written a custom ASP.net control that descends from LinkButton and overrides the Render() method. I'm using it to replace ImageButtons in the site I'm working on so we don't have to have an image for each button. This control works fine, does the required post-backs etc., however it doesn't fire the validators in its validation group. This is obviously an issue. The code for the control is (condensed) as follows: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public class CustomButton : LinkButton { public string SpanCssClass { get; set; } protected override void Render(HtmlTextWriter writer) { if (!Visible) { return; } writer.AddAttribute(HtmlTextWriterAttribute.Name, UniqueID); writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID); writer.AddAttribute(HtmlTextWriterAttribute.Class, CssClass); string postback = string.IsNullOrEmpty(OnClientClick) ? "javascript:__doPostBack('" + UniqueID + "','');" : OnClientClick; writer.AddAttribute(HtmlTextWriterAttribute.Href, postback); writer.RenderBeginTag(HtmlTextWriterTag.A); writer.AddAttribute(HtmlTextWriterAttribute.Class, SpanCssClass); writer.RenderBeginTag(HtmlTextWriterTag.Span); writer.Write(Text); writer.RenderEndTag(); writer.RenderEndTag(); } } Does anyone know why this would not be causing the validators to fire? I was under the impression that leaving all the other methods in LinkButton un-overridden would leave all the other functionality the same!

    Read the article

  • Can overlay work with a portion of a page that has codebehind functionallity?

    - by rolando
    i have a complete DIV in wich a have a gridview and a multiview with codebehind action: <cc3:CRDataSource EnableViewState="true" ID="DsOpciones" runat="server" SQLSelect="CartelElectronico,OpcionSeleccion_Todos"> <Parameters> <asp:QueryStringParameter Name="@FactorEvaluacionId" QueryStringField="FactorEvaluacionId" Type="String" /> </Parameters> </cc3:CRDataSource> <cc3:CRGridView ID="gvTipoFactorSeleccion" runat="server" DataKeyNames="OpcionSeleccionID" AllowPaging="false" AllowSorting="False" AutoGenerateColumns="False" Titulo="Opciones de Factor de Evaluacion" NoRowsMsg="No se encontraron Opciones para el factor de evaluación" CssClass="Table" AllowExport="False" AllowFilter="False" AllowCollapse="True" EnableViewState="False" PageSize="1000000000" DataSourceID="DsOpciones" OnRowUpdating="gvTipoFactorSeleccion_RowUpdating" OnRowDeleting="gvTipoFactorSeleccion_RowDeleting"> <Columns> <asp:BoundField DataField="Nombre" HeaderText="Nombre" SortExpression="Nombre" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="Puntos" HeaderText="Puntos" ItemStyle-HorizontalAlign="Center" /> <asp:CommandField ButtonType="Link" ShowDeleteButton="true" DeleteText="Eliminar" ShowEditButton="true" EditText="Modificar" UpdateText="Actualizar" CancelText="Cancelar" /> <asp:TemplateField Visible="false"> <ItemTemplate> </ItemTemplate> </asp:TemplateField> </Columns> </cc3:CRGridView> <br /> <table> <tr valign="baseline"> <td class="contratacionTablaSubrayadoTitulosLineas"> <label class="contratacionEtiquetas"> Opción&nbsp;(*) :</label> </td> <td class="contratacionTablaSubrayadoContenidoLineas"> <asp:TextBox ID="tbOpcion" runat="server" ToolTip="Nombre del Factor de la metodología de evaluación" TabIndex="1" MaxLength="100"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ControlToValidate="tbOpcion" ErrorMessage="&nbsp;Debe digitar un nombre para la Opción" Display="Dynamic" CssClass="inlineError" ValidationGroup="InsertarTipoFactorSeleccion" SetFocusOnError="false"></asp:RequiredFieldValidator> </td> </tr> <tr valign="baseline"> <td colspan="2" align="right"> <asp:LinkButton ID="LinkButton1" runat="server" CssClass="contratacionVinculos" ValidationGroup="InsertarTipoFactorSeleccion" OnClick="lbInsertarTipoFactorSeleccion_Click">Insertar</asp:LinkButton>&nbsp;|&nbsp; <asp:LinkButton ID="LinkButton2" runat="server" OnClick="lbCancelarInsertarTipoFactorSeleccion_Click" CssClass="contratacionVinculos" CausesValidation="false">Cancelar</asp:LinkButton> .... Thats just a portion of the div, my question is How can I show that DIV in a jquery overlay without loosing its functionallity? i'm asking because i manage to get it working but when i do a "that-div-postback" the screen loses the DIV and keeps only the background of the overlay. a couple more information: <button class="modalInput button" rel="#prompt"> Buscar</button> <script type="text/javascript"> function pageLoad() { var triggers = $("button.modalInput").overlay({ // some expose tweaks suitable for modal dialogs expose: { color: '#333', loadSpeed: 200, opacity: 0.3, zIndex: 99 }, top: '25%', closeOnClick: true }); } </script> Thanks in advance ;)

    Read the article

  • Listview with objectdatasource Delete not working

    - by Radhi
    Hello, i have one Listview in my Usercontrol & 1 objectdatasource binded with the ListView. now in objectdatasource's Deletemethod i have taken businessobject as argument but at runtime i am not getting value in my businessobject's properties... i also tried to use "Bind" instead of "eval" in ItemTemplate. but not getting any value at runtime in my DeleteMethod provided in objectdatasource's Deletecommand... can anybody help to know weather i am mising anything or what? my Listview's ItemTemplate <ItemTemplate> <asp:HiddenField ID="hidUserAchievementInfoId" runat="server" Value='<%# Bind("UserAchievementInfoId") %>' /> <asp:HiddenField ID="hidUserIdField" runat="server" Value='<%# Bind("UserId") %>' /> <tr> <td class="style1"> <asp:Label ID="AwardLabel" runat="server" Text="Award "></asp:Label> </td> <td> <asp:Label ID="lblAward" runat="server" Text='<%# Bind("Awards") %>'></asp:Label> </td> </tr> <tr> <td class="style1"> <asp:Label ID="FieldofAwardLabel" runat="server" Text="Field of Award "></asp:Label> </td> <td> <asp:Label ID="lblFieldofAward" runat="server" Text='<%# Bind("FieldofAward") %>'></asp:Label> </td> </tr> <tr> <td class="style1"> <asp:Label ID="TournamentLabel" runat="server" Text="Tournament "></asp:Label> </td> <td> <asp:Label ID="lblTournament" runat="server" Text='<%# Bind("Tournament") %>'></asp:Label> </td> </tr> <tr> <td class="style1"> <asp:Label ID="AwardYearLabel" runat="server" Text="Award Year "></asp:Label> </td> <td> <asp:Label ID="AwardYear" runat="server" Text='<%# Bind("AwardYear") %>'></asp:Label> </td> </tr> <tr> <td class="style1"> <asp:Label ID="AwardDescriptionLabel" runat="server" Text="Description "></asp:Label> </td> <td> <asp:Label ID="lblAwardDescription" runat="server" Text='<%# Bind("AwardDescription") %>'></asp:Label> </td> </tr> <tr> <td class="style1"> <asp:LinkButton ID="EditButton" runat="server" CommandName="Edit" Text="Edit"></asp:LinkButton> </td> <td> <asp:LinkButton ID="DeleteButton" runat="server" CommandName="Delete" Text="Delete"></asp:LinkButton> </td> </tr> </ItemTemplate> Delete Method used in objectdata source's Deletecommand public void DeleteUserAchievementInfo(UserAchivementInfoBO BOInstance) { try { Int64 UserAchievementInfoId=BOInstance.UserAchievementInfoId objUserBasicInfoServiceClient.DeleteUserAchievementInfo(UserAchievementInfoId); } catch (Exception ex) { HandleException.LogError(ex); } }

    Read the article

  • ASP.NET - Call required field validator before AJAX modalpopup, client side

    - by odinel
    I have an ASP.NET/C# application. The user fills out a form with required fields, then clicks a submit button. An AJAX popup message is then displayed, and if they confirm, their information is posted back to the server. The problem is that the AJAX popup is fired BEFORE the req validator. I need to interrupt this and run the req validator, and then if successful show the popup. I know the req validator is working, because if you cancel the popup message, the req text is shown next to the fields. Textbox and AJAX control code is here: <table> <tr> <td>Name</td> <td> <asp:TextBox ID="txtName" runat="server" CssClass="textBox" AutoPostBack="true"></asp:TextBox> <asp:RequiredFieldValidator ID="reqName" runat="server" Text="*" ControlToValidate="txtName" ValidationGroup="trade" ForeColor="White"></asp:RequiredFieldValidator> </td> </tr> <tr> <td>Address</td> <td> <asp:TextBox ID="txtAdd1" runat="server" CssClass="textBox"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Text="*" ControlToValidate="txtAdd1" ValidationGroup="trade" ForeColor="White"></asp:RequiredFieldValidator> </td> </tr> <tr> <td></td> <td> <asp:Button ID="btnSubmitEnquiry" runat="server" CssClass="buttonText" Text="Submit Enquiry" ValidationGroup="trade" /> </td> </tr> </table> <ajax:ModalPopupExtender ID="ModalPopupExtender1" runat="server" okcontrolid="lnkCancel" targetcontrolid="btnSubmitEnquiry" popupcontrolid="pnlConfirm" popupdraghandlecontrolid="PopupHeader" drag="true" ></ajax:ModalPopupExtender> <asp:Button Text="targetbutton" ID="btnConfTgt" runat="server" Style="display: none" /> <asp:Panel ID="pnlConfirm" style="display:none" runat="server"> <div class="PopupContainer"> <div class="PopupBody"> <br /> <div align="center"> <asp:label ID="Label1" runat="server" CssClass="lblConfirmpopup"> Message goes here </asp:label> </div> <br /><br /><br /> <div align="center"> <asp:LinkButton ID="lnkCancel" runat="server" visible="true" Text="Cancel" CommandName="Update" BorderColor="#FFFFFF" BackColor="#000000" BorderWidth="3" BorderStyle="Double" ForeColor="White" Font-Size="13pt" Font-Underline="False"></asp:LinkButton> <asp:LinkButton ID="lnkConfirm" runat="server" visible="true" Text="Submit Enquiry" CommandName="Update" BorderColor="#FFFFFF" BackColor="#000000" BorderWidth="3" BorderStyle="Double" ForeColor="White" Font-Size="13pt" Font-Underline="False" OnClick="btnSubmitEnquiry_Click"></asp:LinkButton> </div> </div> </div> </asp:Panel> I've tried coding the first submit button to call the client-side req validator method, but no joy; it still shows the popup before the req validator. If there's no simple solution, I was thinking of perhaps an 'outside the box' solution, maybe hiding the initial Submit button after the req validation has passed, then showing an additional button with the popup control attached to it. Not sure how I'd be able to achieve this though. Thanks

    Read the article

  • Is it possible to reference a linkbotton outside an update panel as the update trigger?

    - by Selase
    I have a page based on a master page and as such i can only see the content place holders i used in the master page showing up in the aspx pages based on the master page. the source code shown below: <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CaseAdmin.aspx.cs" Inherits="Prototype4.CaseAdmin" %> <%@PreviousPageType VirtualPath="~/Account/Login.aspx"%> <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"> </asp:Content> <asp:Content ID="CaseRightNews" ContentPlaceHolderID="RightNewsItem" runat="server"> </asp:Content> <asp:Content ID="CaseLeftNav" ContentPlaceHolderID="LeftNavigation" runat="server"> <div style="margin-top:20px; margin-bottom:20px;"> <p class="actionButton"> <asp:LinkButton ID="OpenCaseLinkButton" runat="server" onclick="OpenCaseLinkButton_Click">Open Case</asp:LinkButton> </p> <p class="actionButton"><asp:LinkButton ID="RegisterExhibitLinkButton" runat="server" onclick="RegisterExhibitLinkButton_Click">Register Exhibit</asp:LinkButton> </p> </div> </asp:Content> <asp:Content ID="CaseMainContnt" ContentPlaceHolderID="MainContent" runat="server"> <asp:ScriptManager ID="ScriptManager" runat="server" /> <asp:UpdatePanel ID="CaseMainCntntUpdatePanel" UpdateMode="Conditional" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="" eventname="Click"/> </Triggers> <ContentTemplate> <%--Some text here to inform user to click on the open case botton to display open case form--%> </ContentTemplate> </asp:UpdatePanel> <asp:UpdatePanel runat="server" id="UpdatePanel1" updatemode="Conditional"> <Triggers> <asp:AsyncPostBackTrigger ControlID="" eventname="Click"/> </Triggers> <ContentTemplate> <%--some text here to inform users to click on the add exhibit botton to display add exhibit form--%> </ContentTemplate> </asp:UpdatePanel> </asp:Content> the section of the entire page i wish to change upon update is the (this is the main content of the page). for this reason i placed the updatepanel inside the content place holder since it cant be sitting outside and not wrapped in a content place holder. However, the buttons that i wish to apply the trigger that fires the update to, are in another content place holder(). How can i possibly get those buttons to act as the trigger while changing only what appears in the main content area. Plus, i tried getting the updatepanel to work just so i could see if it does the update well but it turned out really bad. i added some linkbottons in the content template area and used them as the triggers for testing reasons. i tested and the changes took over the entire page in contrast to just appearing in the content area. I actually just wanted to load a form that is created in another asp. page into the main content area... I seriously need help with this... Every little help, detail and information is dearly appreciated... thanks so much in advance

    Read the article

  • Failed to load viewstate

    - by Jen
    OK have just started getting this error and I'm not sure why. I have a hosting page which has listview and a panel with a usercontrol. The listview loads up records with a linkbutton. You click the link button to edit that particular record - which gets loaded up in the formview (within the usercontrol) which goes to edit mode. After an update occurs in the formview I'm triggering an event which my hosting page is listening for. The hosting page then rebinds the listview to show the updated data. So this all works - but when I then go to click on a different linkbutton I get the below error: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3) Timestamp: Fri, 18 Jun 2010 03:15:54 UTC Message: Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. Line: 4723 Char: 21 Code: 0 URI: http://localhost:1951/AdminWebSite/ScriptResource.axd?d=yfdLw4zYs0bqYqs1arL-htap1ceeKCyW1EXhrhMZy_AqJ36FUpx8b2pzMKL6V7ebYsgJDVm_sZ_ykV1hNtFqgYcJCLLtardHm9-yyA7zC4k1&t=ffffffffec2d9970 Any suggestions as to what is actually wrong?? My event listener does this: protected void RatesEditDate1_EditDateRateUpdated() { if (IsDateRangeValid(txtDisplayFrom, txtDisplayTo)) { PropertyAccommodationRates1.DataBind(); } else { pnlViewAccommodationRates.Visible = false; } divEditRate.Visible = false; } When I click my link button - it should be hitting this but the second time round it errors before hitting the breakpoint: protected void RatesEditDate1_EditDateRateSelected(DateTime theDateTime) { // make sure everything else is invisible pnlAddAccommodation.Visible = false; pnlViewEditAccommodations.Visible = false; RatesEditDate1.TheDateTime = theDateTime; RatesEditDate1.PropertyID = (int)Master.PropertyId; if (!String.IsNullOrEmpty(Accommodations1.SelectedValue)) { RatesEditDate1.AccommodationTypeID = Convert.ToInt32(Accommodations1.SelectedValue); } else { RatesEditDate1.AccommodationTypeID = 0; } divEditRate.Visible = true; } So my listview appears to be being rebound successfully - I can see my changed data.. I just don't know why its complaining about viewstate when I click on the linkbutton. Or is there a better way to update the data in my listview? My listview and formview are bound to objectdata sources (in case that matters) Thanks for the help!

    Read the article

  • Why does a ModalPopupExtender fail when using SSL?

    - by Brooke Jackson
    I have created a modal popup using the ModalPopupExtender in Microsoft's AJAX 1.0 for .NET 2.0. It works great when the page doesn't isn't being accessed through SSL (http://) however the link to close the popup fails to fire if accessing the page through https://. Is the ModalPopupExtender at blame? Is it a "Feature" of SSL to block popups, or is it something else I haven't though of? Here is the code I am using: <asp:Button ID="btnHelp" runat="server" Text="?" CausesValidation="False" /> <asp:Panel ID="pnlHelp" BackColor="white" runat="server"> <asp:LinkButton ID="lnkClosePanel" runat="server" CausesValidation="False" OnClick="lnkCloseHelp_Click">Close</asp:LinkButton> <p>Some Text</p> </asp:Panel> <cc1:ModalPopupExtender ID="popExt" runat="server" TargetControlID="btnHelp" PopupControlID="pnlHelp"></cc1:ModalPopupExtender>

    Read the article

  • Implementing a pager for asp.net's DataList/Repeater

    - by emre
    I have a DataList showing the results, and a Repeater that is supposed to be the pager. I decided to use the page number by redirecting with a QueryString parameter, so it will also be bookmarkable ... My problem is mainly in the UI actually. If I put DIV's with their onclick calling a JS function that does window.location = url + pagenumber , then somehow I have to deal with QueryString operations via JS which is a bit messy. If I use LinkButton objects within the ItemTemplate, then the Redirecting happens only when the linkbutton is clicked while whole div has cursor: pointer , you what I mean. What would be the best approach to this? Thanks in advance. Note: I really want to spend the time and effort implementing my own server-side paging. I think its more fun than reading 3rd party manuals.

    Read the article

  • How to Pass parameter to SQlDataSource from gridview?

    - by user144842
    Gridview has many columns and a Delete button as well. Delete button is a control as TemplateField <asp:TemplateField> <ItemTemplate> <asp:LinkButton ID="btnDelete" CommandName="Delete" Text='<%# Eval("disabled").ToString()=="False" ? "Disabled" : "Enabled" %>' OnClientClick="return confirm('Are you sure you want to take this action?');" runat="server"></asp:LinkButton> </ItemTemplate> </asp:TemplateField> Now associated SQLDataSource's Delete command's stored procedure is expecting two parameters. One is going from DataKeyNames (RowID), other one i wanna pass is the Text of btnDelete (True or False). How can i achieve it?

    Read the article

  • problem with pagestate when two links in aspx page

    - by TT.LTT
    I have two links in my aspx page. one link "A" when i click it ...it is downloading some document when i click it other link "B" when I click it ....it redirects me to some other page. Both links triggers function from code behind. Both links works fine when i first come onto page but when i click A it shows me message to download it "open" "save" "cancel" problem is when i click cancel I remain on the same page but now no links work neither link A nor link B. I guess there is some problem with the state my page is in . How i can avoid this? Code so far: <asp:Linkbutton ID="linkbutton1" runat="server" Text="A" onClick="Codebehindmethod" /> <asp:Linkbutton ID="linkbutto2" runat="server" Text="B" onClick="Codebehindmethod1" >

    Read the article

  • Custom GridView delete button

    - by abatishchev
    How can I customize automatically generated command button, e.g. Delete? I want to add a client confirmation on deleting and in the same moment I want this button would be generated on setting AutoGenerateDeleteButton="true". Is it possible?? I can add a custom button this way: <asp:TemplateField> <ItemTemplate> <asp:LinkButton runat="server" CommandName="Delete" OnClientClick="return confirm('Delete?')">Delete</asp:LinkButton> </ItemTemplate> </asp:TemplateField> but it will be not automatically localized and will be not generated on setting AutoGenerateDeleteButton="true"!

    Read the article

  • Missing parameter error after running MySql query

    - by annelie
    Hello, I'm completely new to MySql and haven't used SqlDataSource with UpdateParameters before, so I'm probably missing something very obvious. When trying to update a record, the update does happen but then throws an error saying "'id' parameter is missing at the statement". So the query works and the database gets updated as it should, but an error is thrown afterwards. These are the update parameters: <UpdateParameters> <asp:Parameter Name="business_name" Type="string" Size="256" /> <asp:Parameter Name="addr_line_1" Type="string" Size="256" /> <asp:Parameter Name="addr_line_2" Type="string" Size="256" /> <asp:Parameter Name="addr_line_3" Type="string" Size="256" /> <asp:Parameter Name="postcode" Type="string" Size="32" /> <asp:Parameter Name="county" Type="string" Size="128" /> <asp:Parameter Name="town_city" Type="string" Size="256" /> <asp:Parameter Name="tl_url" Type="string" Size="256" /> <asp:Parameter Name="customer_id" Type="string" Size="16" /> <asp:Parameter Name="region_id" Type="Int16" /> <asp:Parameter Name="description" Type="string" Size="1024" /> <asp:Parameter Name="approval_status" Type="string" Size="1" /> <asp:Parameter Name="tl_user_name" Type="string" Size="256" /> <asp:Parameter Name="phone" Type="string" Size="50" /> <asp:Parameter Name="uploaders_own" Type="Int16" /> </UpdateParameters> Here's the update statement: UPDATE myTable SET business_name = ?, addr_line_1 = ?, addr_line_2 = ?, addr_line_3 = ?, postcode = ?, county = ?, town_city = ?, tl_url = ?, customer_id = ?, region_id = ?, description = ?, approval_status = ?, tl_user_name = ?, phone = ?, uploaders_own = ? WHERE id = " + id Here's the stack trace: [InvalidOperationException: 'id' parameter is missing at the statement] CoreLab.MySql.r.a() +775 CoreLab.MySql.r.a(Int32& A_0, ArrayList& A_1) +448 CoreLab.MySql.x.e() +398 CoreLab.MySql.x.o() +89 CoreLab.MySql.MySqlCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3) +1306 CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior) +310 System.Data.Common.DbCommand.ExecuteReader() +12 CoreLab.Common.DbCommandBase.ExecuteNonQuery() +64 System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +386 System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +325 System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +92 System.Web.UI.WebControls.DetailsView.HandleUpdate(String commandArg, Boolean causesValidation) +837 System.Web.UI.WebControls.DetailsView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +509 System.Web.UI.WebControls.DetailsView.OnBubbleEvent(Object source, EventArgs e) +95 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.DetailsViewRow.OnBubbleEvent(Object source, EventArgs e) +113 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135 System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 Does anyone know what I'm doing wrong? Thanks, Annelie

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >