Search Results

Search found 124 results on 5 pages for 'pageload'.

Page 4/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • how to hightlight a div if the page.isvalid=false.

    - by Nimesh
    I wanna high light particular div when the page.isvalid=false. on the pageload i am able to get display the error message. But the issue is that i am not able to highlight the control which is required. I have a js function which sets the error class to the div. Its working fine when i click on a button. On the page load i wanna set this as well. can i do this using some jquery??? or something other way.. Please let me know how to do this.... share your ideas.... Thanks

    Read the article

  • Show friendly message on ASP.NET Ajax error

    - by balexandre
    You all know how annoying is this: I do have a log system and the correct error is well explicit there, but I want to give a better message to the user. I keep trying several ways but I'm using Telerik components and well jQuery and I ended up using both ASP.NET Ajax methods and jQuery, so I use function pageLoad() { try { var manager = Sys.WebForms.PageRequestManager.getInstance(); manager.add_endRequest(endRequest); manager.add_beginRequest(OnBeginRequest); manager } catch (err) { alert(err); } } as well $(document).ready(function() { ... } that alert(err) is never fired even upon OnClick events what's the best approach to avoid this message errors and provide a cleaner way? all this happens in <asp:UpdatePanel> as I use that when I didn't know better (3 years ago!) and I really don't want to mess up and build all again from scratch :( Any help is greatly appreciated Updated with more error windows after volpav solution

    Read the article

  • Searching for a complex and well-designed PHP OOP application to learn from

    - by Raveren
    Basically, I am diving ever deeper into complex programming practices. I've almost no friends that are experienced (or more experienced than me) programmers to learn from, so I am looking for the next best thing - learning from the work of strangers. Can anyone recommend a real world finished and working application written well and OOP-centered. I'd like to take and analyze its source. Bonus if it's based on Zend Framework. What I am interested most in is objects that unlike desktop applications, have only one real operation done to them (or to their representation in DB or session) during their lifetime (or pageload), like user-logIn(). I'm interested in optimal and reusable design patterns and their real life implementations.

    Read the article

  • Allow only numeric values in textbox not working in Firefox

    - by AsM
    I have one Textbox accepting Bank A/c Number value which should be numerical only. I have written one javascript function for this as follows. function fncInputNumericValuesOnly() { if(!(event.keyCode=48||event.keyCode<=57)) { event.returnValue=false; } } This code is not allowing non-numerical values in IE. but same is not working in Firefox. I also tried to use onkeyup event. & also tried on pageload txtAccountNumber.Attributes.Add("onkeyup","fncInputNumericValuesOnly()") Why this is not working with firefox 3.

    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

  • jquery ui dialog - live not working?

    - by ile
    I'm using this dialog: http://docs.jquery.com/UI/Dialog To open dialog I do it this way: $('a.openModal').live("click", function() { var idArr = $(this).attr('id').split("OpenNote"); var id = idArr[1]; alert($(".modalNote#dialog-modal" + id).html()); $(".modalNote#dialog-modal" + id).dialog('open'); return false; }); This dialog is used to display content of note when title is clicked. When I generated html on pageload, then this works fine, but if I add html dynamically then dialog won't open. It is also not hidden when it's appended to div. Is it possible to open it "on-fly"?

    Read the article

  • how to put value in Label inside gridview during runtime?

    - by nhoyti
    how to put value in Label inside gridview during runtime? I want to put dynamic values in my label inside gridview during pageload. here's my sample code private void SplitStrings() { List<string> listvalues = new List<string>(); listvalues = (List<string>)Session["mylist"]; string[] strvalues = listvalues.ToArray(); if (listvalues != null) { foreach (string strElement in listvalues) { string[] test = strElement.ToString().Split("|".ToCharArray()); string prodQuantity = test[0].ToString(); foreach (GridView row in gvOrderProducts.Rows) { prodQuantity = ((Label)row.FindControl("lblQuantity")).Text; } } } } i want the lblQuantity label to display the values of quantity in my gridview

    Read the article

  • Index out of range, but why?

    - by Stuart
    I have a gridview, and i have a SelectedIndexChanged event on it... protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow Row = GridView1.SelectedRow; //do some stuff } Then i get an error... Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index I dont understand why, the Gridview is being binded in pageload. but not in post back... if (!IsPostBack) { GridView1.DataSource = UserAccounts; GridView1.DataBind(); }

    Read the article

  • How to display model popup at first time page load only

    - by Guna Sundari
    I used the following code to display model popup for the first time page load, <script type="text/javascript"> function pageload() { var chkPostBack = '<%= Page.IsPostBack ? "true" : "false" %>'; if (chkPostBack == 'false') { var popup = $find('ModalPopupExtender1'); if (popup != null) { popup.show(); } } } I got the following error, Please help me. The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

    Read the article

  • Why there is so few AJAX (WEB 2.0) websites ?

    - by Frodik
    I am wondering and looking for some general reasons why there is so few full AJAX websites. Good example would be Gmail, which really uses a lot of the modern web technologies. But there is so few of these and almost all the websites use classic "request - pageload" approach. I am going to be developing website with most requests completed by AJAX call, as there is need for as few page loads as possible. So I am looking for some general advices or opinions about this. My personal big concern is search engines, because if most of the content is at one URL, how do you make that AJAX content crawlable ? There are probably more these questions which rise up, and I am looking for these to prepare for these problems before I start developing and it's too late to fix them.

    Read the article

  • How does a youtube embed suppress the buffering of a video file?

    - by usingtechnology
    When a youtube video is displayed within an external site, a poster image is displayed but the actual video is not loaded until the user clicks the play button. At that point, the video file begins to buffer and the video plays. This seems to be different than many sites, where a flash video is embedded and the video begins to buffer automatically in the background on page load, regardless of whether the video is set to autoplay or not. How would you set up a flash video (non-youtube) to have the same behavior as youtube, where buffering does not occur at pageload? Is it an output setting that is selected during the flash video rendering process, or is it accomplished using a different method?

    Read the article

  • jQuery - Set selected value of all dropdowns on page

    - by Tgibson
    Hello Frieds, I have another jQuery question. For a user control with lots of database activity, I would like to use jQuery to set the selected values of all of the dropdowns to their "current" value. I want to do this to make the page appear to have finished the database call. My jQuery skill is not the best, but I believe I need to use the pageLoad(). And since each dropdown is inside of a user control I can search for those dropdowns beginning with "usrControl" $('select[id ^="usrControl"'].each(function(){ var selectedValue = $(this).val() $(this).val(selectedValue) }); Something like this is what I have in mind. Thanks

    Read the article

  • Javascript Headscratcher

    - by Jason
    I have the following in a javascript file (using jQuery as well): $(function(){ $('#mybutton').live('click',myObject.someMethod); }); var myObject = { someMethod: function() { //do stuff } }; I get a js error on pageload that says "myObject isn't defined". However, when I change the event handler in the doc.ready function to: $('#mybutton').live('click', function(){ myObject.someMethod(); }); it works! I have code structured like the first example all over my codebase that works. W T F??

    Read the article

  • An Epic Question "How to call a method when the page loads"

    - by Arunkumar Ramamoorthy
    Quite often, there comes a question in OTN, with different subjects, all meaning "How to call a method when my ADF page loads?". More often, people tend to take the approach of ADF Phase Listener by overriding before/afterPhase methods.In this blog, we will go through different options in achieving it.1. Method Call Activity as default activity in Taskflow :If the application is built with taskflows, then this is the best suited approach to take. 1.a. Calling a Data Control Method :To call a Data Control method (ex: A method in AMImpl exposed as client interface), simply Drag and Drop the method as Default Method Call Activity, then draw a control flow case from the method to your page. Once after this, drop the taskflow as region in main page. When we run the main page, the Method Call Activity would be called first, and then the page will be rendered.1.b. Calling a Method in Backing Bean: To call a method in the backing bean before pageload, we can follow the similar approach as above. Instead of binding the Method Call Activity to an action/method binding in pagedef, we bind to the method. Insert a Method Call Activity (and make it as default) from the Component Palette. Double click on to select a method to bind. This approach can also be used, to perform some action in backing bean along with calling a method Data Control (just need to add bindings code in backing bean to execute DC method). 2. Using invokeAction Executable :If the application is built with pages and no taskflows are involved, then this option can be taken into consideration.In the page definition of the page, add an invokeAction Executable and bind it to the method needed to be executed. 3. Using combination of Server and Client Listeners : If the page does not have any page definition, then to call a method in backing bean, this approach can be taken. In this, a serverListener would be added at the document level, which would be calling the method in backing bean. Along with this, a clientListener would be added with "load" type (i.e will be triggered when the page loads), which would queue a serverEvent to trigger the method. 4. Using Page Phase Listener :This should be the last resort. Care should be taken when using this approach since the Phase Listener would be called for each request sent by the client.Zeeshan Baig's blog covers this scenario.

    Read the article

  • An Epic Question "How to call a method when the page loads"

    - by Arunkumar Ramamoorthy
    Quite often, there comes a question in OTN, with different subjects, all meaning "How to call a method when my ADF page loads?". More often, people tend to take the approach of ADF Phase Listener by overriding before/afterPhase methods.In this blog, we will go through different options in achieving it.1. Method Call Activity as default activity in Taskflow :If the application is built with taskflows, then this is the best suited approach to take. 1.a. Calling a Data Control Method :To call a Data Control method (ex: A method in AMImpl exposed as client interface), simply Drag and Drop the method as Default Method Call Activity, then draw a control flow case from the method to your page. Once after this, drop the taskflow as region in main page. When we run the main page, the Method Call Activity would be called first, and then the page will be rendered.1.b. Calling a Method in Backing Bean: To call a method in the backing bean before pageload, we can follow the similar approach as above. Instead of binding the Method Call Activity to an action/method binding in pagedef, we bind to the method. Insert a Method Call Activity (and make it as default) from the Component Palette. Double click on to select a method to bind. This approach can also be used, to perform some action in backing bean along with calling a method Data Control (just need to add bindings code in backing bean to execute DC method). 2. Using invokeAction Executable :If the application is built with pages and no taskflows are involved, then this option can be taken into consideration.In the page definition of the page, add an invokeAction Executable and bind it to the method needed to be executed. 3. Using combination of Server and Client Listeners : If the page does not have any page definition, then to call a method in backing bean, this approach can be taken. In this, a serverListener would be added at the document level, which would be calling the method in backing bean. Along with this, a clientListener would be added with "load" type (i.e will be triggered when the page loads), which would queue a serverEvent to trigger the method. 4. Using Page Phase Listener :This should be the last resort. Care should be taken when using this approach since the Phase Listener would be called for each request sent by the client.Zeeshan Baig's blog covers this scenario.

    Read the article

  • Base Pages and Interfaces for ASP.NET Pages

    - by geekrutherford
    For quite a while I have been using the concept of base pages when developing pages in ASP.NET applications. It is a wonderful method for exposing common functions to all of your applications pages and also overriding certain events for various purposes (i.e. dynamic themes).  Recently I found out a new developer will be joining my team. This prompted me to review the applications code for readability and ease of maintenance. I began adding comments through out the code behind for all pages within the application. While doing so I noted that I had used common method names for such things as loading data, configuring controls, applying filters, etc.   Bringing a new developer on board, I wanted to make the transition as seamless as possible while also ensuring they follow existing coding practices we already have in place. While I could have created virtual methods for the common page methods allowing them to overridden, what I really needed was a way to ensure the new developer implemented the same methods for each and every page. Thus I created an interface to force the issue.   Now, every page not only inherits the base page class but also implements an interface. This provides every page not only common functions and overridden page events but also imposes rules for implementing certain common methods :-)   Interface   public interface BasePageInterface { /// Configures page based on users security permissions. void CheckPermissions(); /// Configures Filter Form control for current page.  /// Ensure you have set the FilteredGrid and PageAjaxManager properties of the FilterForm control in PageLoad!!!  void ConfigureFilters(); /// Sets event handlers and default settings for controls on the current page. void ConfigureControls(); /// Exports data bound to grid in selected format. void ExportGridData(ExportFormat fmt); /// Loads data and binds to grid. /// Columns are turned on/off in grid depending on tab selected and users permissions.  void LoadData(); }   Page code-behind class definition:   public partial class MyPage : BasePage, BasePageInterface Note, you could not use an abstract class to accomplish this considering C# does not allow for multiple inheritance.  Nor could the base page class be abstract since it needs to inherit from the System.Web.UI.Page class in order to override page events.

    Read the article

  • [AJAX Numeric Updown Control] Microsoft JScript runtime error: The number of fractional digits is out of range

    - by Jenson
    If you have using Ajax control toolkits a lot (which I will skip the parts on where to download and how to configure it in Visual Studio 2010), you might have encountered some bugs or limitations of the controls, or rather, some weird behaviours. I would call them weird behaviours though. Recently, I've been working on a Ajax numeric updown control, which i remember clearly it was working fine without problems. In fact, I use 2 numeric updown control this time. So I went on to configure it to be as simple as possible and I will just use the default up and down buttons provided by it (so that I won't need to design my own). I have two textbox controls to display the value controlled by the updown control. One for month, and another for year. <asp:TextBox ID="txtMonth" runat="server" CssClass="txtNumeric" ReadOnly="True" Width="150px" /> <asp:TextBox ID="txtYear" runat="server" CssClass="txtNumeric" ReadOnly="True" Width="150px" /> So I will now drop 1 numeric updown control for each of the textboxes. <asp:NumericUpDownExtender ID="txtMonth_NumericUpDownExtender"     runat="server" TargetControlID="txtMonth" Maximum="12" Minimum="1" Width="152"> </asp:NumericUpDownExtender>                          <asp:NumericUpDownExtender ID="txtYear_NumericUpDownExtender"     runat="server" TargetControlID="txtYear" Width="152"> </asp:NumericUpDownExtender>                                                  You noticed that I configure the Maximum and Minimum value for the first numericupdown control, but I never did the same for the second one (for txtYear). That's because it won't work, well, at least for me. So I remove the Minimum="2000" and Maximum="2099" from there. Then I would configure the initial value to the the current year, and let the year to flow up and down freely. If you want, you want write the codes to restrict it. Here are the codes I used on PageLoad:     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load         If Not Page.IsPostBack Then             If Trim(txtMonth.Text) = "" Then                 Me.txtMonth.Text = System.DateTime.Today.Month             End If             If Trim(txtYear.Text) = "" Then                 Me.txtYear.Text = System.DateTime.Today.Year             End If         End If     End Sub   Enjoy!

    Read the article

  • Force Postback from code behind? Or reload JavaScript from an Asynchronous Postback?

    - by sah302
    Hi all, I've got a Jquery UI dialog that pops up to confirm the creation of an item after filling out a form. I have the form in an update panel due to various needs of the form, and especially because I want validation being done on the form without reloading the page. JavaScript appears to not reload on an asynchronoous postback. This means when the form is a success and I change the variable 'formSubmitPass' to true, it does not get passed to the Javascript via <%= formSubmitPass %. If I add a trigger to the submit button to do a full postback, it works. However I don't want the submit button to do a full postback as I said so I can validate the form within the update panel. How can I have this so my form validates asynchronously, but my javaScript will properly reload when the form is completed successfully and the item is saved to the database? Javascript: var formSubmitPass = '<%= formSubmitPass %>'; var redirectUrl = '<%= redirectUrl %>'; function pageLoad() { $('#formPassBox').dialog({ autoOpen: false, width: 400, resizable: false, modal: true, draggable: false, buttons: { "Ok": function() { window.location.href = redirectUrl; } }, open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); var t = window.setTimeout("goToUrl()", 5000); } }); if(formSubmitPass == 'True') { $('#formPassBox').dialog({ autoOpen: true }); } So how can I force a postback from the code behind, or reload the JavaScript on an Asynchronous Postback, or do this in a way that will work such that I can continue to do Async form validation? Edit: I change formSubmitPass at the very end of the code behind: If errorCount = 0 Then formSubmitPass = True upForm.Update() Else formSubmitPass = False End If So on a full postback, the value does change.

    Read the article

  • Reading text out of textbox in Radgrid

    - by Christophe
    I have a Radgrid with 2 Textboxes and 2 DatePickers. The idea is that I have a grid with a Property name, value, valid from and until. I'm filling the first Textbox myself, the user has to fill in the value, from and until. Filling in the propertynames: (In the pageload) foreach (String s in testProperties) { DataRow dr = dt.NewRow(); dr[0] = s; dr[1] = ""; dr[2] = ""; dr[3] = ""; dt.Rows.Add(dr); } When the user hit "Save" I have to read out all the data he filled in. (In the btnSave click) foreach (GridDataItem dataItem in RadGrid1.Items) { String[] str = new String[3]; str[0] = ((TextBox)dataItem["col2"].FindControl("TextBox2")).Text; str[1] = ((RadDatePicker)dataItem["col3"].FindControl("RadDatePicker1")).SelectedDate.ToString(); str[2] = ((RadDatePicker)dataItem["col4"].FindControl("RadDatePicker2")).SelectedDate.ToString(); properties.Add(((TextBox)dataItem["col1"].FindControl("TextBox1")).Text, str); } Now this is where I have the problem. When i read out the data all my 'str' have the value "" instead the data that the user fills in. Question is, how comes my values in the texboxes remain ""? Or is their a better way to read out the data?

    Read the article

  • Site Security/Access management for asp.net mvc application

    - by minal
    I am trying to find a good pattern to use for user access validation. Basically on a webforms application I had a framework which used user roles to define access, ie, users were assigned into roles, and "pages" were granted access to a page. I had a table in the database with all the pages listed in it. Pages could have child pages that got their access inherited from the parent. When defining access, I assigned the roles access to the pages. Users in the role then had access to the pages. It is fairly simple to manage as well. The way I implemented this was on a base class that every page inherited. On pageload/init I would check the page url and validate access and act appropriately. However I am now working on a MVC application and need to implement something similar, however I can't find a good way to make my previous solution work. Purely because I don't have static pages as url paths. Also I am not sure how best to approach this as I now have controllers rather then aspx pages. I have looked at the MVCSitemapprovider, but that does not work off a database, it needs a sitemap file. I need control of changing user persmissions on the fly. Any thoughts/suggestions/pointers would be greatly appreciated.

    Read the article

  • Invoking WCF service from Javascript

    - by KhanS
    I have a asp.net web application, and have some java script code in it. While calling the service I am getting the exception Service1 is undefined. Below is my code. Service: namespace WebApplication2 { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together. [ServiceContract(Namespace="WCFServices")] public interface IService1 { [OperationContract] string HelloWorld(); } } Implementation namespace WebApplication2 { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together. [ServiceBehavior(IncludeExceptionDetailInFaults = true)] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class Service1 : IService1 { public string HelloWorld() { return "Hello world from service"; } } } ASPX page: <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <asp:ScriptManager ID="QNAScriptManager" runat="server"> <Services> <asp:ServiceReference Path="~/Service1.svc" /> </Services> <Scripts> <asp:ScriptReference Path="~/Scripts/Questions.js" /> </Scripts> </asp:ScriptManager> </asp:Content> Java Script var ServiceProxy; function pageLoad() { ServiceProxy = new Service1(); ServiceProxy.set_defaultSucceededCallback(SucceededCallback); } function GetString() { ServiceProxy.HelloWorld(); } function SucceededCallback(result, userContext, methodName) { var RsltElem = document.getElementById("Results"); RsltElem.innerHTML = result + " from " + methodName + "."; alert("Msg received from service"); }

    Read the article

  • Payapl sandbox a/c in Dotnet..IPN Response Invaild

    - by Sam
    Hi, I am Integrating paypal to mysite.. i use sandbox account,One Buyer a/c and one more for seller a/c...and downloaded the below code from paypal site string strSandbox = "https://www.sandbox.paypal.com/cgi-bin/webscr"; HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strSandbox); //Set values for the request back req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; byte[] param = Request.BinaryRead(HttpContext.Current.Request.ContentLength); string strRequest = Encoding.ASCII.GetString(param); strRequest += "&cmd=_notify-validate"; req.ContentLength = strRequest.Length; //for proxy //WebProxy proxy = new WebProxy(new Uri("http://url:port#")); //req.Proxy = proxy; //Send the request to PayPal and get the response StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII); streamOut.Write(strRequest); streamOut.Close(); StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream()); string strResponse = streamIn.ReadToEnd(); streamIn.Close(); if (strResponse == "VERIFIED") { //check the payment_status is Completed //check that txn_id has not been previously processed //check that receiver_email is your Primary PayPal email //check that payment_amount/payment_currency are correct //process payment } else if (strResponse == "INVALID") { //log for manual investigation } else { //log response/ipn data for manual investigation } and when add this snippets in pageload event of success page i get the ipn response as INVALID but amount paid successfully but i am getting invalid..any help..Paypal Docs in not Clear. thanks in advance

    Read the article

  • Paypal sandbox account in dotnet: "IPN Response invalid"

    - by Sam
    I am integrating Paypal with my website. I use a sandbox account, one buyer account and one seller account. I downloaded the code below from Paypal: string strSandbox = "https://www.sandbox.paypal.com/cgi-bin/webscr"; HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strSandbox); //Set values for the request back req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; byte[] param = Request.BinaryRead(HttpContext.Current.Request.ContentLength); string strRequest = Encoding.ASCII.GetString(param); strRequest += "&cmd=_notify-validate"; req.ContentLength = strRequest.Length; //for proxy //WebProxy proxy = new WebProxy(new Uri("http://url:port#")); //req.Proxy = proxy; //Send the request to PayPal and get the response StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII); streamOut.Write(strRequest); streamOut.Close(); StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream()); string strResponse = streamIn.ReadToEnd(); streamIn.Close(); if (strResponse == "VERIFIED") { //check the payment_status is Completed //check that txn_id has not been previously processed //check that receiver_email is your Primary PayPal email //check that payment_amount/payment_currency are correct //process payment } else if (strResponse == "INVALID") { //log for manual investigation } else { //log response/ipn data for manual investigation } When I add this snippet in my pageload event of my success page, I show the IPN response as INVALID, but amount is paid successfully. Why is this? Paypal's docs are not clear.

    Read the article

  • gridview commandargument on buttonfield pagination used

    - by ClareBear
    Hello all, I am using c#.net I have a gridview which needs to contain a 'Use' button (appointmentId set as the commandargument). Source Code <asp:GridView ID="resultsReturned" runat="server" AllowPaging="True" AutoGenerateColumns="False" EnableSortingAndPagingCallbacks="True" OnPageIndexChanged="resultsReturned_PageIndexChanged" onrowcommand="resultsReturned_RowCommand"> <Columns> <asp:BoundField DataField="UserAppointmentId" HeaderText="App ID" /> <asp:BoundField DataField="UserBookingName" HeaderText="Booking Name" /> <asp:TemplateField> <ItemTemplate> <asp:Button runat="server" ID="UseButton" Text="Use" CommandName="Use" CommandArgument="UserAppointmentId" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> Code-Behind protected void resultsReturned_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Use") { correctAppointmentID.Value = (e.CommandArgument.ToString()); } } This is used for the pagination: private void BindAppointments() { var results = appointmentRepos.GetBookingIdBySearchCriteria(catgoryid, resultsReturned.PageIndex * resultsReturned.PageSize, -1); resultsReturned.DataSource = results; resultsReturned.DataBind(); } I am binding the appointments to the gridview within the PageLoad/search_Click This is the error I am receiving: Callbacks are not supported on TemplateField because some controls cannot update properly in a callback. Turn callbacks off on 'resultsReturned'. Thanks in advance for any help Clare

    Read the article

  • jquery: how can i load the Google Maps API via ajax?

    - by Haroldo
    Before you reply: this is not as straight foward as you'd expect! I have a 'show on map' button which when clicked opens a dialogbox/lightbox with the google map in. I don't want to load the maps api on pageload, just when a map has been requested This is php file the "show on map" button puts into the dialog box: <div id="map_canvas"></div> <script type="text/javascript"> $(function() { //google maps stuff var latlng = new google.maps.LatLng(<?php echo $coords ?>); var options = { zoom: 14, center: latlng, mapTypeControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById('map_canvas'), options); var marker = new google.maps.Marker({ position: new google.maps.LatLng(<?php echo $coords ?>), map: map }); }) </script> I've been trying to load the API before ajaxing in the dialog like this: $('img.map').click(function(){ var rel = $(this).attr('rel'); $.getScript('http://maps.google.com/maps/api/js?sensor=false', function(){ $.fn.colorbox({ href:rel }) }); }) this doesn't seem to work :( i've also tried: adding <script src="http://maps.google.com/maps/api/js?sensor=false"></script> to the ajax file type="text/javascript" running $.getScript('http://maps.google.com/maps/api/js?sensor=false'); on doc.ready the problem the browser seems to be redirected to the api.js file - you see a white screen

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >