Search Results

Search found 729 results on 30 pages for 'postback'.

Page 23/30 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Session being reset when using sub-domain.

    - by Adam Witko
    Hi, I'm trying to use sub-domains in my ASP.NET website but I'm coming across a few problems with the session being reset. I've edited my hosts file to have 'localhost', 'one.localhost' and 'two.localhost'. I can go to any of these URLs and do what I need to do and login to my system. The session mode is defined as follows in the web.config: I'm using SQLServer as the website will be ran as a webfarm. What I'm finding is when I click something that causes a postback all the session is lost and a new session id is created, when this occurs my website is now 'localhost' rather than the logged in 'one.localhost' for example. Does anyone know what might be causing this? Cheers

    Read the article

  • Treeview Slow in IE?!?!

    - by Mike
    I have a treeview with around 200 records that needs to be fully expanded at all times (so no loading on demand). It is inside of an update panel with the updatemode set to conditional. There are other update panels on the page as well that are set to conditional. Depending on user actions the tree may need to be rebuilt by calling databind and updating the updatepanel. Everything works fine in firefox, longest postback about 2 seconds. With IE I have to wait up to 30 seconds sometimes and the action may have nothing to do with the tree just changing a dropdown in its own updatepanel takes forever. I have considered the size of viewstate and just raw HTML generated may be causing the delay but wouldn't that effect both browsers? Anyone have anyideas what is making it so slow in IE??? Thanks!

    Read the article

  • Examples of when to use PageAsyncTask (Asynchronous asp.net pages)

    - by Tony_Henrich
    From my understanding from reading about ASP.NET asynchronous pages, the method which executes when the asynchronous task begins ALWAYS EXECUTES between the prerender and the pre-render Complete events. So because the page's controls' events run between the page's load and prerender events, is it true that whatever the begin task handler (handler for BeginAsync below) produces, it can't be used in the controls' events? So for example, if the handler gets data from a database, the data can't be used in any of the controls' postback events? Would you bind data to a data control after prerender? PageAsyncTask pat = new PageAsyncTask(BeginAsync, EndAsync, null, null, true); this.RegisterAsyncTask(pat);

    Read the article

  • Control button Post Back when click it in ASP.NET with VB.NET

    - by Lefteris Gkinis
    In my Default.aspx web page i use the following code in order to save some Attributes to an xml file <asp:Button ID="Button1" Text="Save Attributes" CssClass="Button01" runat="server" OnClientClick="SaveAttributesButton_Click(); return, false;" > </asp:Button> when i Click on the button that starts to make postback all the code right from the page load I have already use the HTML Button but this need a java script which is run when the page load And sub without my command Please is there anybody which can assist me on this issue?

    Read the article

  • asp:calendar not work correctly in MVC

    - by TStamper
    I have an asp:calendar on my view page and as I hover over it..it shows a javascript postback status bar. but I have an asp:button also on the same page and when I hover over it. The action from the controller is in the status bar..because I have an onClick attribute for the button that triggers an action on the server side. and in the asp:calendar I also have a trigger event OnSelectionChanged the has a method on the server side...but as I said when I hover over the calendar to pick a date in the status bar it shows:javascript:_doPostBack($ct100ContentPlaceHolder?mycalendar',''3270) and when I click a date I receive an error that says object doesnt support this method..Also mycalendar is the id name of the asp:calendar

    Read the article

  • Accesing Label.text in DataList

    - by Itay Gurvich
    So im trying to access informtaion from a label inside the DataList by pressing a button inside it. I put a code in thusly: protected void DataList1_SelectedIndexChanged(object sender, EventArgs e) { Character character = (Character)Session["character"]; Label lbl = (Label)DataList1.SelectedItem.FindControl("lblName"); int SkillID = int.Parse(DAL.ExecuteScalar("SELECT SkillID FROM skills WHERE SkillName = '" + lbl.ToString() + "'").ToString()); DAL.ExecuteNonQuery("INSERT INTO AssignedSkills (Offensive) Values ('" + SkillID.ToString() + "') WHERE CharID = '" + character.get_name().ToString() + "'"); } when i press the button its not even getting there and im getting an error "Invalid postback or callback argument." how can i access it?

    Read the article

  • Is count(*) really expensive ?

    - by Anil Namde
    I have a page where I have 4 tabs displaying 4 different reports based off different tables. I obtain the row count of each table using a select count(*) from <table> query and display number of rows available in each table on the tabs. As a result, each page postback causes 5 count(*) queries to be executed (4 to get counts and 1 for pagination) and 1 query for getting the report content. Now my question is: are count(*) queries really expensive -- should I keep the row counts (at least those that are displayed on the tab) in the view state of page instead of querying multiple times? How expensive are COUNT(*) queries ?

    Read the article

  • Model View Presenter plus ASP.NET Web Service; where does the asmx live?

    - by Dirk
    I've been slowly transitioning from a traditional web forms architecture to the MVP pattern (Passive View). So far, it's been fairly easy to implement b/c the views I've dealt with have all employed a classic PostBack model. However, I've come across my first view that will refresh portions of itself via web services. I can't grok where the web service should live (Presenter I think) or how to expose that asmx end point to my View while still maintaining the clean separation of concerns/testability that MVP affords me. I've searched far and wide for some examples on how this might be implemented and have come up with nothing. Please help!

    Read the article

  • InfoPath browser form submitting dirty fields changed through javascript

    - by Xavier
    I'm trying to submit an InfoPath browser form with fields that have been modified through the Spell Checker included in Sharepoint server. The spell checker checks all the fields in the page and once the user closes the SpellChecker dialog, it changes the textboxes with the new values through javascript. When I click Submit, debug the FormEvents_Submit in the form code behind and try to do a GetNodeValue("XPath to changed field"), it still shows the old values. I realize that this may be a problem of doing postbacks and I'd like to do a full page postback once the SpellChecker is done changing all the textboxes. Any suggestions would be appreciated. Thanks.

    Read the article

  • Custom validatior in ASP.net

    - by DJPB
    Hi there. I'm working on an ASP.NET/C# app. I have 2 text boxes and I need to validate if the input text for both of them are not both null ex: if(string.IsNullOrEmpty(TextBox1.Text) && string.IsNullOrEmpty(TextBox2.Text) ) //FAIL!!! else // OK! that is, at least one txtBox has values I was planning on using a custom validator but it seems that the validation function only gets called when something is written on the textBox i'm using has the 'control to validate'. Now, that doesn't work for me since I want to show an error message when both text boxes are empty. Is there a way to make the validation function to be called with, for example a postback? Or is there any other better approach to this case than the custom validator? tks

    Read the article

  • help me to understand viewstate

    - by EquinoX
    I was just reading this article here to understand about how view state and ASP.NET page cycle works. I just don't understand this part here: If this were the case, then in step 3 the Label's Text property would be assigned to "Hello, World!" in the instantiation stage, but would not be reassigned to "Goodbye, Everyone!" in the load view state stage. Therefore, from the end user's perspective, the Label's Text property would be "Goodbye, Everyone!" in step 2, but would seemingly be reset to its original value ("Hello, World!") in step 3, after clicking the Empty Postback button. This paragraph is after the three step 1, step 2, step 3 boxes. Why wouldn't the label's text property be reassigned to "Goodbye, Everyone" in the load view state?

    Read the article

  • Things to take care while sending the username and password using Ajax request ?

    - by Anil Namde
    Normally we have login page with username, password filed and signin button. Using the normal form based approach we send the data on and page gets post back. Now i would like to change this using the Ajax. As Ajax too using the normal HTTP so i guess nothing in different from the existing workflow barring postback right ? Now my question is is what all securities issues can be there? and what care should be taken for doing so ? Should we encode data using say base64 or so before sending using Ajax?

    Read the article

  • Placeholder containing dynamic table is empty unless I create table twice

    - by Mike O.
    I am dynamically creating a table that contains a textbox in each cell. The table is put in a placeholder control. Everything displays perfectly. The problem is when I go to retrieve the values entered in the cells. I have the code to generate the table in a separate method called CreateTable(). In order for my program to find a table in the placeholder when I go to save, I have to run CreateTable() in a postback event AND in the PageLoad event. If I call CreateTable() in only one of those places and I try to save, it says the placeholder is empty and, therefore, I cannot save the textbox contents. I've tried calling CreateTable() from InitLoad but that doesn't work because it needs to reference values from three static controls: 1 dropdown, 1 listbox, and 1 calendar control, which I don't believe have had their viewstate rendered yet. Anyone have any ideas? It would sure be nice not to have to double the number of database calls just to make this work.

    Read the article

  • Using Jquery to check if a URL is valid

    - by user102533
    A long running background process creates a text file to indicate the completion of the process. From the frontend, I'd need to check every few seconds if the text file has been created or not. I am doing this check from However the file is created in http://DomainB.com/Mytext.txt Can someone help me write a jquery script that checks for a file across domain? PS: Currently, I am doing a ajax postback that executes a WebMethod in ASP.NET that creates HttpWebRequest. This works functionally, but I have major performance problems. So, I need a light weight way of finding if a URL is valid or not.

    Read the article

  • Dropdownlist AppendDataboundItems (first item to be blank)

    - by zohair
    Hi, I have a drop down list inside an update panel that is populated on postback from a sql data source. It has a parameter which is another control. I sometimes need multiple postbacks, but what happens is that each time the update panel refreshes, items are added to the dropdownlist. So the dropdown list ends up having data that is incorrect, or repeated data. I have the AppendDataboundItems property set to true because I need the first item to be blank. How can I overcome this problem? Is there another way to have a blank first item? (This dropdown is in an asp.net2.0 web app, and codebehind is in c#) Thank you.

    Read the article

  • Dropdown binding and postbacks - ASP.NET

    - by DotnetDude
    I have a rather complex page. The ASPX page loads a user control which in turn loads a child User control. Parent Control protected override void OnInit(EventArgs e) { //Loads child control } In the child user control, I use custom control that inherits from System.Web.UI.HtmlControls.HtmlSelect ASCX: <cust:CustDropDownList id="ctlDdl" runat="server"/> ASCX.CS protected void Page_Load(object sender, EventArgs e) { //Binds CtlDdl here } When the user clicks on the Save button, the controls get user controls get dynamically reloaded, but Iose the value the user has selected in the dropdown. I run into the chicken and egg problem here. I think I need to bind the ctlDdl only on if its not a postback, but that results in the dropdown not getting populated. If I bind it everytime, then i lose user's selection EDIT: Can someone respond to my comment to Jonathan's answer? Thanks

    Read the article

  • How do you find the balance between Javascript (jQuery) and code behind in ASP.NET.

    - by PieterG
    Stackoverflow members, How do you currently find the balance between javascript and code behind. I have recently come across some extremely bad (in my eyes) legacy code that lends itself to chaos (someHugeJavafile.js) which contains a lot of the logic used in many of the pages. Let's say for example that you have a Form that you need to complete. 1. Personal Details 2. Address Information 3. Little bit more about yourself You don't want to overload the person with all the fields at once, so you decide to split it up into steps. Do you create separate pages for Personal Details, Address Information and a Little bit more about yourself. Do you create controls for each and hide and show them on a postback or using some update panel? Do you use jQuery and do some checking to ensure that the person has completed the required fields for the step and show the new "section" by using .show()? How do you usually find the balance?

    Read the article

  • integrating facebook auth into my web form app

    - by user169692
    Hi, I would like to allow my users to authorise my app with their fb on registration. All of the examples i see redirect users to the fb canvas page after authorisation, but i only want this to be a step in the registration process. Essentially, i want an icon they can click that would open up a new window where they can login to fb and a simple postback to the registration page where i would detect the login and hide the login button. Any ideas on how I can achieve this using the facebook c# sdk? Thanks and Merry Christmas :)

    Read the article

  • ASP.NET GridView - how to enable validation declaratively

    - by Joe
    It it possible to enable validation in an ASP.NET GridView purely declaratively? What I've tried: A GridView bound to an ObjectDataSource with SelectMethod and UpdateMethod defined The GridView contains some ReadOnly BoundField columns and a TemplateField whose EditTemplate contains a TextBox and a RegularExpressionValidator that only allows numeric input in the TextBox. The GridView also contains a CommandField with ShowEditButton=true and CausesValidation=true. If I click on Edit, enter an invalid value, then click on Save, there is a PostBack, and an exception is thrown in the server (Input string was not in a correct format). I can of course avoid this by adding validation code to the RowUpdating event handler on the server (see below), but is there any declarative way to force the validation to be done without adding this code? protected void MyGridView_RowUpdating(object sender, GridViewUpdateEventArgs e) { Page.Validate("MyValidationGroup"); if (!Page.IsValid) { e.Cancel = true; } }

    Read the article

  • ASP.net hiding panel using javascript

    - by Zaps
    Hi, I have a radioButtonList with 2 items in it. A radiobutton with a "Yes" value and a radionButton with a "No" value. Below that I have a panel which I want made visible when "Yes" radioButton is selected and hidden when "No" is selected. I had originally implemented this using the AutoPostBack attribute but I want to do it in Javascript so that it doesn't cause a postback. Here's the code. Any help would be greatly appreciated. <asp:RadioButtonList ID="rbl1" runat="server" onClick="changed(this);" > <asp:ListItem Value="Yes">Yes</asp:ListItem> <asp:ListItem Value="No">No</asp:ListItem> <asp:Panel ID="panel1" runat="server"> <--other controls here --> </asp:Panel> function changed(rbl) { //not sure what to put in here } Thanks in advance, Zaps

    Read the article

  • Asychronous page update with ASP.NET MVC

    - by Graham
    Hi, I'm learning ASP.NET MVC 1.0 and need to implement an asynchronous/dynamic page update. I'm new to MVC and jQuery so I'm not sure what to look for. What I want to do is to allow a user to start a monitoring a domain layer function (similar to a news ticker) and then do a partial page update based on the continously changing results. In ASP.NET I'd do this with a javascript timer to cause a postback, and an AJAX update panel..... but this seems a bit "hacky" for ASP.NET MVC. Is there a better way?

    Read the article

  • asp.net drop down list viewstate issue after client side Ajax update

    - by DSharper
    In my aspx page I have drop down list that initialy in page load event loads up with list of values which is shown to client(drop down list "A") and in client side, depending on client selecion of another drop down list(drop down list "B") I have written a javascript to update drop down list "A" with corresponding values with Ajax behaviour(without full page postback). But when we post page to the server, in server side page load event shows initialy sent list of values for drop down list "A" but not the values that were loaded by Ajax calls due to ViewState not being updated correctly due to Ajax call. I could fix this easily with update panel but it increased Ajax request size to 44KB which is much higher than what currently is for hand made Ajax script I have written( 0.5KB) Is there special way of fixing this rather than using update panel?

    Read the article

  • Error messages in ASP.NET with jQuery UI

    - by eugeneK
    I've been using my own Error reporting module which was combination of simple c# and jQueryUI Dialog. Problem is that once error or success occurs i do write it's value to session. It does work pretty good on pages with Responce.Redirect on error but not on pages where i catch an error and then return to same form. My question is why does session which added pre-postback fails to load in pages where i have return statement on some condition. And if there another way to save errors and success message except in session ? Maybe global variables or something like that ...

    Read the article

  • ASP.NET Radio Button State and Back Key

    - by Dave S
    When using the browser back key on a page with radio buttons and using auto-postback, the state of the buttons (checked) stays the same while other parts of the page do not. This results in a situation where button two is checked and the cached page (because of server-side logic) displays a message that button 1 is checked. What is the best way to handle this situation? The following code example exhibits this behavior: [Form:] <asp:RadioButton ID="rb1" runat="server" AutoPostBack="true" Text="Button1" OnCheckedChanged="rb_CheckedChanged" GroupName="rbgroup" Checked="true" /> <br /> <asp:RadioButton ID="rb2" runat="server" AutoPostBack="true" Text="Button2" OnCheckedChanged="rb_CheckedChanged" GroupName="rbgroup" /> <br /> <hr /> <asp:Label ID="lbl1" runat="server">Button 1</asp:Label> [Code Behind:] protected void rb_CheckedChanged(object sender, EventArgs e) { if (rb1.Checked == true) lbl1.Text = "Button 1"; else lbl1.Text = "Button 2"; }

    Read the article

  • Asp.net mvc 3: Strange Validation

    - by coure06
    I have applied DataAnnotation based validations to two of my properties like this [Required(ErrorMessage = "Title is required")] public string Title { get; set; } [Required(ErrorMessage = "Description is required")] public string Description { get; set; } Here is the view page's code @Html.LabelFor(model => model.Obj.Title) @Html.EditorFor(model => model.Obj.Title) @Html.LabelFor(model => model.Obj.Description) @Html.TextAreaFor(model => model.Obj.Description) The Problem is that on click of submit button, on client side (js) its only giving me error for for Title and not for the Description. But Its giving me validation error for the Description after the postback. What possible causes?

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >