postback

ASP.NET Ajax CalendarExtender will not update SelectedDate value

无人久伴 提交于 2019-12-05 02:51:58
For some reason, any CalendarExtenders on an ASP.NET site that is being worked on will not be updated. I have already checked all the obvious places (such as AutoPostBack and AutoEventHandler). The problem is that when I select a date from the Calendar and post it to the form, the TextBox that is being extended IS being updated, but the calendar extender's date is simply not being being updated (e.g. SelectedDate is still the same as before). I have googled for any possible solutions but none have worked. Here is the code: <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master"

Base class includes field but type not compatible with type of control

好久不见. 提交于 2019-12-04 23:46:25
The base class includes the field 'lbl', but its type (web.App_Code.CustomLabelControl) is not compatible with the type of control (web.App_Code.CustomLabelControl). I had done many custom controls before the same way but Hell this error is driving me nuts. I have a web application project with the below class in App_Code directory a tagprefix reference in web.config for the control in class. What do I do now? Web.Config <system.web> <pages> <controls> <add namespace="web.App_Code" tagPrefix="CControls"/>... Markup <form id="form1" runat="server"> <div> <CControls:CustomLabelControl runat=

ASP.Net Button not raising postback

梦想的初衷 提交于 2019-12-04 19:29:35
I've a simple page in one of our web applications, which has the following markup: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewUpload.aspx.cs" Inherits="Mass_Upload.NewUpload" MasterPageFile="~/Master" Title="Document Mass Upload" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> <link rel="Stylesheet" type="text/css" href="./../CSS/ScrollingTable.css" /> <script type="text/javascript" src="../Help/HelpPopup.js" /> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="CenterH1" runat="server"> Document Mass Upload <a href="javascript

best way to display search results on the same page as the search control in ASP.Net

元气小坏坏 提交于 2019-12-04 19:03:32
I have two controls on a page, one is a search entry and submission control the other is the search results control, they have to be separated due to the layout of the site. Im looking at different ways of having the search control submit displaying the search results in the results control, initially im not bother about postbacks, im more bothered about two things 1) How do i pass the selected search terms back to the same page (or indeed to the control that displays the results) QUerystring, hiddenfield, session, viewstate (effectively hidden field)? 2) how do i actually make the page submit

How do I get my WebGrid to POST instead of GET during a sort or paging operation in my MVC4 site?

江枫思渺然 提交于 2019-12-04 17:45:15
I have a fairly simple site with a Search partial view and a Listing partial view. They're rolled up using multiple models into the Index view. Everything is fine. Except when I click the grid column headers to sort or attempt to page to the next listing of data, the grid comes back empty. If I re-submit the same search criteria, then the grid repopulates with all applicable data sorted or paged properly. I've tracked this behavior down to the fact that the WebGrid sets up it's paging and sorting mechanisms as a GET instead of a POST. So obviously all my model data is left off the submission.

Two types of postback events

被刻印的时光 ゝ 提交于 2019-12-04 15:32:41
1) I found two articles, each categorizing a bit differently the two types of postback events: One resource says the two types of postback events are Changed event ( where controls implement IPostbackDataHandler ), which fires when data is changed between postbacks, and then are Raised events ( where controls implement IPostbackEventHandler ), which are raised by server controls for whatever reason the control sees fit Other article says the two types are Immediate response events and Change events. According to this article, Immediate response events are ones that actually trigger a postback

Does not appear to be emitting correct GridView markup for __doPostBack

情到浓时终转凉″ 提交于 2019-12-04 14:11:25
I asked this question regarding a strange behaviour from a GridView control in ASP.Net (I'm using C#). For each row in my GridView there is an an 'Edit' and 'Delete' link. The edit for example has this javascript:__doPostBack('gvwServers','Edit$0') - So obviously the server is going to figure out someone has clicked to edit row 0 of gvwServers . Fair enough. If I click the Edit link I get a postback and the GridView is redrawn with the Edit button replaced with an 'Update' and 'Cancel' button. Standard behaviour. NOW - The 'Cancel' button has this link javascript:__doPostBack('gvwServers',

asp.net: Postback disabled after validation failed

寵の児 提交于 2019-12-04 12:11:10
After validation failed, I have a problem with controls (dropdownlist or button) that should cause a new postback. I will try to explain it clearly... The purpose of my page is to save fives dates in a database. The page has the following controls: Five textboxes, each one containing a date A reset button (CausesValidation=false) to restore a default date in one of the 5 textboxes A dropdown list (AutoPostback=true, CausesValidation=false) of predefined templates that applies 5 dates to the 5 textboxes A button to save the dates to the database The textboxes can be edited manually. So, when I

ASP.Net: User controls added to placeholder dynamically cannot retrieve values

北战南征 提交于 2019-12-04 11:20:43
问题 I am adding some user controls dynamically to a PlaceHolder server control. My user control consists of some labels and some textbox controls. When I submit the form and try to view the contents of the textboxes (within each user control) on the server, they are empty. When the postback completes, the textboxes have the data that I entered prior to postback. This tells me that the text in the boxes are being retained through ViewState. I just don't know why I can't find them when I'm

Run javascript after form submission in update panel?

人走茶凉 提交于 2019-12-04 10:46:39
This is driving me crazy! I have read at least 5 questions on here closely related to my problem, and probably 5 or so more pages just from googling. I just don't get it. I am trying to have a jqueryui dialog come up after a user fills out a form saying 'registration submitted' and then redirecting to another page, but I cannot for the life of me get any javascript to work, not even a single alert. Here is my update panel: <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="upForm" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="False">