Search Results

Search found 59301 results on 2373 pages for 'asp net ajax'.

Page 138/2373 | < Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >

  • Jquery .$.ajax is not working

    - by Saravanan I M
    I am using $.ajax for facebook invite and calling the url (Yii framework controller). The below code is not working. $.ajax is not working. function FacebookInviteFriends() { FB.ui ( { method : 'apprequests', data: '', display: 'dialog', title : 'Invite a Friend', message: 'I just sent you an invitation to play My Game.', filters: ['app_non_users'] }, function(response) { alert("start"); if (response && response.to) { alert("inside if"); $.ajax({ url: 'http://localhost:83/invitechips/createRecord', type: 'POST', data: {id : response.to} }).done(function() { alert( "Data Saved: "); }); } else { alert("inside else"); } } ); }

    Read the article

  • wait for ajax request then finish the rest ( jQuery )

    - by user1725155
    I have a peace of jquery code: var new = checkCP(somedata); if(new=="hi"){ alert("Welcom"); } function checkCP(jsData){ $.ajax({ type: "POST", url: "Process.php", data: jsData, dataType: "json", success: function(data){ if(data.match==1) return "hi"; else return "bye"; } }); } I don't know why the welcome alert never show up . I checked everything , even on PHP file the result is 1 but apparently before It wait for ajax respond it passes the if(new=="hi"){ alert("Welcom"); } So is there anyway to wait for ajax respond then read the rest of codes in jQuery ? Thanks.

    Read the article

  • Added AJAX controls to toolkit but can't add them to webpage, no smart tags

    - by Eric3141
    Added AJAX controls to my toolkit as per directions online. They appear in the AJAX Toolkit tab in the toolbox just fine. Try to add them to design view and does not work. Tried selecting the textbox and clicking the smart tag to add the extender but there is not smart tag. Googled and found suggestion to reset toolbox and re-add AJAX controls. Did that and problem remains. Any help is appreciated!!!

    Read the article

  • Submit form if ajax validator returns true using jquery

    - by Anthony
    I am not sure where I'm going wrong. The idea is that before the form is submitted, one of the input fields is sent to a server-side validator via ajax. If the response is 1, the input is valid and the form should be submitted. If the response is 0, the form should not be submitted. The issue is that I can't figure out how to set a variable within the ajax request function that will prevent the form from being submitted. This is what I have: $("#form").submit(function() { var valid= false; var input = $("#input").val(); $.ajax({ type: "POST", url: "validator.php", data: "input=" + input, success: function(msg){ valid = (msg == 1) ? true : false; if(!valid) { $("#valid_input").html("Please enter valid info"); } else { $("#valid_input").html(""); } } }); return valid; });

    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

  • File download using Java, Struts 2 and AJAX

    - by amar4kintu
    Hello Friends, I want to give file download using java,struts2 and ajax. On my html page there is a button called "export" clicking on which ajax call will be made which will execute a query and will create .xls file using code and I want to give that file for download to user without storing it on hard drive. Does any one know how to do that using struts2 and ajax in java? Is there any example available? Let me know if you need more details from me... Thanks. amar4kintu

    Read the article

  • Problem with outputting html via AJAX

    - by Marek
    Hello I am new to JS and AJAX, but I have to do my homework. I choose jQuery, so it little easy now. I want to get a html via AJAX request, but in result it looks, ex: <fieldset id=\"item4\" class=\"item\"><legend>Odno\u015bnik 4<\/legend> I set response content-type to text/html. When I outputting result on server everything is ok. jQuery code: enter code here $.ajax({ dataType : 'html', data : 'add_sz='+changeSize+'&next_id='+nextId, url : '/kohana/admin/menus/ajax_items_refresh', error : function(err, xhr, status) { msgOutput.text('error msg'); }, success : function(data, xhr, textStatus) { msgOutput.text('success msg'); var tabs = $('#items-list'); $('#items-wrap').html($('#items-wrap').html() + data); Could somebody help me? What I am doing wrong? Kind Regards.

    Read the article

  • Zend and Jquery (Ajax Post)

    - by Zend_Newbie_Dev
    I'm using zend framework, i would like to get POST data using Jquery ajax post on a to save without refreshing the page. //submit.js $(function() { $('#buttonSaveDetails').click(function (){ var details = $('textarea#details').val(); var id = $('#task_id').val(); $.ajax({ type: 'POST', url: 'http://localhost/myproject/public/module/save', async: false, data: 'id=' + id + '&details=' + details, success: function(responseText) { //alert(responseText) console.log(responseText); } }); }); }); On my controller, I just don't know how to retrieve the POST data from ajax. public function saveAction() { $data = $this->_request->getPost(); echo $id = $data['id']; echo $details = $data['details']; //this wont work; } Thanks in advance.

    Read the article

  • AJAX with jQuery not returning data

    - by James P
    This is my Javascript: $(document).ready(function() { $('#like').bind('keydown', function(e) { if(e.keyCode == 13) { var likeMsg = $('#like').val(); if(likeMsg) { // Send the AJAX request to like.php $.ajax({ url: 'like.php', success: function(data) { alert('Content: ' + data); } }); } } }); }); And this is my like.php file: <?php echo "It works! :)"; ?> When I press enter on the #like input, it seems the AJAX request is sent and an alert box comes up saying: Content:, but there's no data being sent back from like.php... I have checked if the file exists and if it's in the same directory and whatever and it is, so I'm pretty much clueless atm. Does anyone know what could be wrong here? Cheers.

    Read the article

  • Simple Sinatra Ajax Not Working

    - by proteantech
    I was trying make an AJAX call from a static file on my computer to a simple sinatra service. The ajax call was returning with an error and no details. The server logged no errors either. Another strange symptom was that the Origin in the request header was null. I turns out that you can't make cross domain ajax calls without a little extra effort. You can set the Access-Control-Allow-Origin header on your sinatra response to expose your service to external domains using a snippet like this: get '/hi' do response['Access-Control-Allow-Origin'] = '*' content_type 'text/plain' "Hello World" end There's also another header you can set to allow other HTTP Methods besides gets, Access-Control-Request-Method. You can find more information by searching around for CORS: Cross Origin Resource Sharing and the previously mentioned headers. Oh, and in case you want to do this in Rails as well you can do something like this in your controller: after_filter :set_access_control_headers def set_access_control_headers headers['Access-Control-Allow-Origin'] = '*' headers['Access-Control-Request-Method'] = '*' end

    Read the article

  • why i got : ReferenceError: $ is not defined $.ajax({

    - by user2922621
    i need to call phpfile through ajax.. i tried \::; <html> <script type="text/javascript"> setInterval(function(){ test(); },3000); function test(){ $.ajax({ type: "POST", url: "GetMachineDetail.php", data: "{}", success: function(response){ alert("suceccess");} }); } Its simple javascript jquery calling.. but we got ajax not found eror, any solution please.

    Read the article

  • Can't get jQuery ajax work

    - by yozloy
    I'm new to jQuery, and it really cool, but I can't get the basic ajax work, there's no error in the console ,so I don't know where goes wrong: getJSON function version: $(document).ready(function(){ $.getJSON('http://pollview:8888/js/example.json', function(data){ for(var element in data){ console.log(data[element]); } }); }); then the basic ajax version: $(document).ready(function(){ $.ajax({ url: 'http://pollview:8888/js/example.json' }).done(function(data){ alert('successful'); }); }); I get me stuck, any idea?

    Read the article

  • Getting an Ajax response from Zend Framework Controller

    - by JavaLava
    I'm doing an Ajax request on one of my views to a Controller but I am unable to send back a response to the Ajax method. In the snippet below, I am trying to send the word 'hellopanda' back but in the alert message, I'll get data as an object. View : $.ajax({ type: "POST", url: "localhost/some-activity", data: dataString, success: function(data) { alert( "Data is: " + data); //do something with data }, error: function(data){ alert( "Data is: " + data); //do something with data }, onComplete: function(){ } }); Controller: public function someActivityAction(){ //do stuff echo "hellopanda"; } I'm pretty sure the echo is the problem. Any insights on to how to do a proper response to the view would be greatly appreciated.

    Read the article

  • AJAX or full page reload

    - by wh0
    I have a simple web page with top navigation and the content, on click of a certain link in top navigation content changes accordingly. Now my question is should do it using AJAX call and load the HTML it into content or should i reload the entire page.It is small page fetching data does not take much of the time but i wonder approach is better suited and why ? My opinion is AJAX way, but some of the web pages that i have seen goes for full page reload i wonder why. i'm not sure AJAX method it has any cons in it. Can someone please elaborate this for me.

    Read the article

  • .net developers and web designers: how to interact?

    - by just_name
    I'm an asp.net developer, and I face some problems when I deal with designers. The designer always complains about the asp.net server controls. They rather just have an html file and create css files along with the required images to go with those. Sometimes if the design phase is done in advance I get html files with related css files, but then we face many problems integrating the design with the aspx files (sever controls an telerik controls ... etc). What I want to ask about is: How to overcome these problems? The designers prefer php- and mvc developers because of the problems with .net server controls. I need to know how to interact with the designers in a correct way. Are there any tools or applications to provide the designers with the rendered (html page) of the .aspx pages? By that I mean the page in runtime rather than the aspx in visual studio. They do use Web Expression but they want the rendered page in html as well.

    Read the article

  • Crazy idea: Connect .NET and SAP with SAP JCo using IKVM.NET

    - by Kottan
    Because the SAP Connector for .NET is no longer maintained by SAP, I am now looking for an alternative to connect the Microsoft world with the SAP world. I know there a third party products like ERPConnect, but I want to do this with tools from SAP. Therefore there arised the crazy idea to use the SAP Java Connector in combination with the tool IKVM.NET (www.ikvm.net/devguide/net2java.html). IKVM.NET provides The IKVMC tool, which converts Java bytecode to .NET dll's and exe's. "No sooner said than done!" I converted the SAP JCo to .NET dlls and created a new Visual Studio solution. I put all the JCO files into a subdirectory of my solution. I set 2 references to the generated IKVM.OpenJDK.Core.dll and sapjco.dll. Great, all JCO classes where now available as .NET classes. Full of optimism I wrote some little code to connect to a SAP system. JCO.Client client = null; client = JCO.createClient(...) The compiliation of my testcode had no errors. "Wonderful !" I thought. Then I started my tetstapplication. Unfortunately I got an exception calling JCO.createClient: Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'\r\nno sapjcorfc in java.library.path I have 2 questions on this topic. 1) Do you think my idea using SAP Java Connector to connect .NET with SAP is a good idea or is it nonsens ? Perhaps someone had already the same idea ;-) 2) How can the above exception be solved ?

    Read the article

  • Anatomy of a .NET Assembly - PE Headers

    - by Simon Cooper
    Today, I'll be starting a look at what exactly is inside a .NET assembly - how the metadata and IL is stored, how Windows knows how to load it, and what all those bytes are actually doing. First of all, we need to understand the PE file format. PE files .NET assemblies are built on top of the PE (Portable Executable) file format that is used for all Windows executables and dlls, which itself is built on top of the MSDOS executable file format. The reason for this is that when .NET 1 was released, it wasn't a built-in part of the operating system like it is nowadays. Prior to Windows XP, .NET executables had to load like any other executable, had to execute native code to start the CLR to read & execute the rest of the file. However, starting with Windows XP, the operating system loader knows natively how to deal with .NET assemblies, rendering most of this legacy code & structure unnecessary. It still is part of the spec, and so is part of every .NET assembly. The result of this is that there are a lot of structure values in the assembly that simply aren't meaningful in a .NET assembly, as they refer to features that aren't needed. These are either set to zero or to certain pre-defined values, specified in the CLR spec. There are also several fields that specify the size of other datastructures in the file, which I will generally be glossing over in this initial post. Structure of a PE file Most of a PE file is split up into separate sections; each section stores different types of data. For instance, the .text section stores all the executable code; .rsrc stores unmanaged resources, .debug contains debugging information, and so on. Each section has a section header associated with it; this specifies whether the section is executable, read-only or read/write, whether it can be cached... When an exe or dll is loaded, each section can be mapped into a different location in memory as the OS loader sees fit. In order to reliably address a particular location within a file, most file offsets are specified using a Relative Virtual Address (RVA). This specifies the offset from the start of each section, rather than the offset within the executable file on disk, so the various sections can be moved around in memory without breaking anything. The mapping from RVA to file offset is done using the section headers, which specify the range of RVAs which are valid within that section. For example, if the .rsrc section header specifies that the base RVA is 0x4000, and the section starts at file offset 0xa00, then an RVA of 0x401d (offset 0x1d within the .rsrc section) corresponds to a file offset of 0xa1d. Because each section has its own base RVA, each valid RVA has a one-to-one mapping with a particular file offset. PE headers As I said above, most of the header information isn't relevant to .NET assemblies. To help show what's going on, I've created a diagram identifying all the various parts of the first 512 bytes of a .NET executable assembly. I've highlighted the relevant bytes that I will refer to in this post: Bear in mind that all numbers are stored in the assembly in little-endian format; the hex number 0x0123 will appear as 23 01 in the diagram. The first 64 bytes of every file is the DOS header. This starts with the magic number 'MZ' (0x4D, 0x5A in hex), identifying this file as an executable file of some sort (an .exe or .dll). Most of the rest of this header is zeroed out. The important part of this header is at offset 0x3C - this contains the file offset of the PE signature (0x80). Between the DOS header & PE signature is the DOS stub - this is a stub program that simply prints out 'This program cannot be run in DOS mode.\r\n' to the console. I will be having a closer look at this stub later on. The PE signature starts at offset 0x80, with the magic number 'PE\0\0' (0x50, 0x45, 0x00, 0x00), identifying this file as a PE executable, followed by the PE file header (also known as the COFF header). The relevant field in this header is in the last two bytes, and it specifies whether the file is an executable or a dll; bit 0x2000 is set for a dll. Next up is the PE standard fields, which start with a magic number of 0x010b for x86 and AnyCPU assemblies, and 0x20b for x64 assemblies. Most of the rest of the fields are to do with the CLR loader stub, which I will be covering in a later post. After the PE standard fields comes the NT-specific fields; again, most of these are not relevant for .NET assemblies. The one that is is the highlighted Subsystem field, and specifies if this is a GUI or console app - 0x20 for a GUI app, 0x30 for a console app. Data directories & section headers After the PE and COFF headers come the data directories; each directory specifies the RVA (first 4 bytes) and size (next 4 bytes) of various important parts of the executable. The only relevant ones are the 2nd (Import table), 13th (Import Address table), and 15th (CLI header). The Import and Import Address table are only used by the startup stub, so we will look at those later on. The 15th points to the CLI header, where the CLR-specific metadata begins. After the data directories comes the section headers; one for each section in the file. Each header starts with the section's ASCII name, null-padded to 8 bytes. Again, most of each header is irrelevant, but I've highlighted the base RVA and file offset in each header. In the diagram, you can see the following sections: .text: base RVA 0x2000, file offset 0x200 .rsrc: base RVA 0x4000, file offset 0xa00 .reloc: base RVA 0x6000, file offset 0x1000 The .text section contains all the CLR metadata and code, and so is by far the largest in .NET assemblies. The .rsrc section contains the data you see in the Details page in the right-click file properties page, but is otherwise unused. The .reloc section contains address relocations, which we will look at when we study the CLR startup stub. What about the CLR? As you can see, most of the first 512 bytes of an assembly are largely irrelevant to the CLR, and only a few bytes specify needed things like the bitness (AnyCPU/x86 or x64), whether this is an exe or dll, and the type of app this is. There are some bytes that I haven't covered that affect the layout of the file (eg. the file alignment, which determines where in a file each section can start). These values are pretty much constant in most .NET assemblies, and don't affect the CLR data directly. Conclusion To summarize, the important data in the first 512 bytes of a file is: DOS header. This contains a pointer to the PE signature. DOS stub, which we'll be looking at in a later post. PE signature PE file header (aka COFF header). This specifies whether the file is an exe or a dll. PE standard fields. This specifies whether the file is AnyCPU/32bit or 64bit. PE NT-specific fields. This specifies what type of app this is, if it is an app. Data directories. The 15th entry (at offset 0x168) contains the RVA and size of the CLI header inside the .text section. Section headers. These are used to map between RVA and file offset. The important one is .text, which is where all the CLR data is stored. In my next post, we'll start looking at the metadata used by the CLR directly, which is all inside the .text section.

    Read the article

  • Perform Grouping of Resultsets in Code, not on Database Level

    - by NinjaBomb
    Stackoverflowers, I have a resultset from a SQL query in the form of: Category Column2 Column3 A 2 3.50 A 3 2 B 3 2 B 1 5 ... I need to group the resultset based on the Category column and sum the values for Column2 and Column3. I have to do it in code because I cannot perform the grouping in the SQL query that gets the data due to the complexity of the query (long story). This grouped data will then be displayed in a table. I have it working for specific set of values in the Category column, but I would like a solution that would handle any possible values that appear in the Category column. I know there has to be a straightforward, efficient way to do it but I cannot wrap my head around it right now. How would you accomplish it? EDIT I have attempted to group the result in SQL using the exact same grouping query suggested by Thomas Levesque and both times our entire RDBMS crashed trying to process the query. I was under the impression that Linq was not available until .NET 3.5. This is a .NET 2.0 web application so I did not think it was an option. Am I wrong in thinking that? EDIT Starting a bounty because I believe this would be a good technique to have in the toolbox to use no matter where the different resultsets are coming from. I believe knowing the most concise way to group any 2 somewhat similar sets of data in code (without .NET LINQ) would be beneficial to more people than just me.

    Read the article

  • Some questions about writing on ASP.NET response stream

    - by vtortola
    Hi, I'm making tests with ASP.NET HttpHandler for download a file writting directly on the response stream, and I'm not pretty sure about the way I'm doing it. This is a example method, in the future the file could be stored in a BLOB in the database: public void GetFile(HttpResponse response) { String fileName = "example.iso"; response.ClearHeaders(); response.ClearContent(); response.ContentType = "application/octet-stream"; response.AppendHeader("Content-Disposition", "attachment; filename=" + fileName); using (FileStream fs = new FileStream(Path.Combine(HttpContext.Current.Server.MapPath("~/App_Data"), fileName), FileMode.Open)) { Byte[] buffer = new Byte[4096]; Int32 readed = 0; while ((readed = fs.Read(buffer, 0, buffer.Length)) > 0) { response.OutputStream.Write(buffer, 0, readed); response.Flush(); } } } But, I'm not sure if this is correct or there is a better way to do it. My questions are: When I open the url with the browser, appears the "Save File" dialog... but it seems like the server has started already to push data into the stream before I click "Save", is that normal? If I remove the line"response.Flush()", when I open the url with the browser, ... I see how the web server is pushing data but the "Save File" dialog doesn't come up, (or at least not in a reasonable time fashion) why? When I open the url with a WebRequest object, I see that the HttpResponse.ContentLength is "-1", although I can read the stream and get the file. What is the meaning of -1? When is HttpResponse.ContentLength going to show the length of the response? For example, I have a method that retrieves a big xml compresed with deflate as a binary stream, but in that case... when I access it with a WebRequest, in the HttpResponse I can actually see the ContentLength with the length of the stream, why? What is the optimal length for the Byte[] array that I use as buffer for optimal performance in a web server? I've read that is between 4K and 8K... but which factors should I consider to make the correct decision. Does this method bloat the IIS or client memory usage? or is it actually buffering the transference correctly? Sorry for so many questions, I'm pretty new in web development :P Cheers.

    Read the article

  • How to Edit data in nested Listview

    - by miti737
    I am using listview to display a list of items and a nested listview to show list of features to each item. Both parent and child listview need to able Insert,Edit and delete operation. It works fine for parent listview. But when I try to edit an child item, The edit button does not take it into Edit mode. Can you please suggest me what I am missing in my code? <asp:ListView ID="lvParent" runat="server" OnItemDataBound="lvParent_ItemDataBound" onitemcanceling="lvParent_ItemCanceling" onitemcommand="lvParent_ItemCommand" DataKeyNames="ItemID" onitemdeleting="lvParent_ItemDeleting" oniteminserting="lvParent_ItemInserting" > <LayoutTemplate> <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder> <div align="right"> <asp:Button ID="btnInsert" runat="server" Text="ADD Item" onclick="btnInsert_Click"/> </div> </LayoutTemplate> <ItemTemplate> <table runat="server" cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td> <div id="dvDetail"> <span >Description</span> <asp:TextBox ID="txtDescription" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Description") %>' TextMode="MultiLine" ></asp:TextBox> </div> <div id="dvFeature" > <span>Feature List</span> <asp:ListView ID="lvChild" runat="server" InsertItemPosition="LastItem" DataKeyNames="FeatureID" OnItemCommand="lvChild_ItemCommand" OnItemCanceling="lvChild_ItemCanceling" OnItemDeleting="lvChild_ItemDeleting" OnItemEditing="lvChild_ItemEditing" OnItemInserting="lvChild_ItemInserting" OnItemUpdating="lvChild_ItemUpdating" DataSource='<%# DataBinder.Eval(Container.DataItem, "FeatureList") %>' > <LayoutTemplate> <ul > <asp:PlaceHolder runat="server" ID="itemPlaceHolder" ></asp:PlaceHolder> </ul> </LayoutTemplate> <ItemTemplate> <li> <span class="dvList"><%# DataBinder.Eval(Container.DataItem, "FeatureTitle")%></span> <div class="dvButton" > <asp:ImageButton ID="btnEdit" runat="server" ImageUrl="/Images/edit_16x16.gif" AlternateText= "Edit" CommandName="Edit" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "FeatureID") %>' Width="12" Height="12" /> <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="/Images/delete_16x16.gif" AlternateText= "Delete" CommandName="Delete" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "FeatureID") %>' Width="12" Height="12" /> </div> </li> </ItemTemplate> <EditItemTemplate> <li> <asp:TextBox ID="txtFeature" Text='<%# DataBinder.Eval(Container.DataItem, "FeatureTitle")%>' runat="server"></asp:TextBox> <div class="dvButton"> <asp:ImageButton ID="btnUpdate" runat="server" ImageUrl="/Images/ok_16x16.gif" AlternateText= "Update" CommandName="Update" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "FeatureID") %>' Width="12" Height="12" /> <asp:ImageButton ID="btnCancel" runat="server" ImageUrl="/Images/delete_16x16.gif" AlternateText= "Cancel" CommandName="Cancel" Width="12" Height="12" CausesValidation="false" /> </div> </li> </EditItemTemplate> <InsertItemTemplate> <asp:TextBox ID="txtFeature" runat="server"></asp:TextBox> <div class="dvButton"> <asp:ImageButton ID="btnInsert" runat="server" ImageUrl="/Images/ok_16x16.gif" AlternateText= "Insert" CommandName="Insert" Width="12" Height="12" /> <asp:ImageButton ID="btnCancel" runat="server" ImageUrl="/Images/delete_16x16.gif" AlternateText= "Cancel" CommandName="Cancel" Width="12" Height="12" CausesValidation="false" /> </div> </InsertItemTemplate> </asp:ListView> </div> </td> </tr> <tr> <td align="right"> <div id="dvButton" > <asp:Button ID="btnSave" runat="server" Text="Save" CommandName="Save" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ItemID") %>' /> <asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="Cancel" CommandName="Delete" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ItemID") %>' /> </div> </td> </tr> </table> </ItemTemplate> </asp:ListView> Code Behind: protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { BindData(); } } private void BindData() { MyDataContext data = new MyDataContext(); var result = from itm in data.ItemLists where itm.ItemID == iItemID select new { itm.ItemID, itm.Description, FeatureList = itm.Features }; lvParent.DataSource = result; lvParent.DataBind(); } protected void lvChild_ItemEditing(object sender, ListViewEditEventArgs e) { ListView lvChild = sender as ListView; lvChild.EditIndex = e.NewEditIndex; lvChild.DataBind(); } Edit: protected void lvChild_ItemEditing(object sender, ListViewEditEventArgs e) { ListView lvChild = sender as ListView; lvChild.EditIndex = e.NewEditIndex; lvChild.DataBind(); } If I use "lvChild.DataBind()" in 'ItemEditing' event, the total list of child items goes away if I click 'edit' protected void lvChild_ItemEditing(object sender, ListViewEditEventArgs e) { ListView lvChild = sender as ListView; lvChild.EditIndex = e.NewEditIndex; } if I get rid of 'lvChild.Databind' in ItemEditing event, it goes to Edit mode after clicking the 'edit' button twice . And though it shows textbox control of EditItemTemplate, it appears as a blank textbox (does not bind existing value to edit).

    Read the article

  • RSACryptoServiceProvider CryptographicException System Cannot Find the File Specified under ASP.NET

    - by Will Hughes
    I have an application which is making use of the RSACryptoServiceProvider to decrypt some data using a known private key (stored in a variable). When the IIS Application Pool is configured to use Network Service, everything runs fine. However, when we configure the IIS Application Pool to run the code under a different Identity, we get the following: System.Security.Cryptography.CryptographicException: The system cannot find the file specified. at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) at System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters(RSAParameters parameters) at System.Security.Cryptography.RSA.FromXmlString(String xmlString) The code is something like this: byte[] input; byte[] output; string private_key_xml; var provider = new System.Cryptography.RSACryptoServiceProvider(this.m_key.Key_Size); provider.FromXmlString(private_key_xml); // Fails Here when Application Pool Identity != Network Service ouput = provider.Decrypt(input, false); // False = Use PKCS#1 v1.5 Padding There are resources which attempt to answer it by stating that you should give the user read access to the machine key store - however there is no definitive answer to solve this issue. Environment: IIS 6.0, Windows Server 2003 R2, .NET 3.5 SP1

    Read the article

  • wmd editor (jquery version) over ajax forms

    - by Davide Barison
    i'm trying wmd editor over ajax. here there is the bugged code wdm code is based on openlibrary fork on github it work very good without ajax. but when i try to display editor over ajax form it doesn't load. non ajax version produce this html: <div id="wmd-container"> <div id="wmd-button-bar"></div> <div id="wmd-button-bar-0" class="wmd-button-bar"><ul class="wmd-button-row"><li style="background-position: 0px 0px;" title="Strong &lt;strong&gt; Ctrl+B" class="wmd-button wmd-bold-button"></li><li style="background-position: -20px 0px;" title="Emphasis &lt;em&gt; Ctrl+I" class="wmd-button wmd-italic-button"></li><li class="wmd-spacer"></li><li style="background-position: -40px 0px;" title="Hyperlink &lt;a&gt; Ctrl+L" class="wmd-button wmd-link-button"></li><li style="background-position: -60px 0px;" title="Blockquote &lt;blockquote&gt; Ctrl+Q" class="wmd-button wmd-quote-button"></li><li style="background-position: -80px 0px;" title="Code Sample &lt;pre&gt;&lt;code&gt; Ctrl+K" class="wmd-button wmd-code-button"></li><li style="background-position: -100px 0px;" title="Image &lt;img&gt; Ctrl+G" class="wmd-button wmd-image-button"></li><li class="wmd-spacer"></li><li style="background-position: -120px 0px;" title="Numbered List &lt;ol&gt; Ctrl+O" class="wmd-button wmd-olist-button"></li><li style="background-position: -140px 0px;" title="Bulleted List &lt;ul&gt; Ctrl+U" class="wmd-button wmd-ulist-button"></li><li style="background-position: -160px 0px;" title="Heading &lt;h1&gt;/&lt;h2&gt; Ctrl+H" class="wmd-button wmd-heading-button"></li><li style="background-position: -180px 0px;" title="Horizontal Rule &lt;hr&gt; Ctrl+R" class="wmd-button wmd-hr-button"></li><li class="wmd-spacer"></li><li style="background-position: -200px -20px;" title="Undo - Ctrl+Z" class="wmd-button wmd-undo-button"></li><li style="background-position: -220px -20px;" title="Redo - Ctrl+Shift+Z" class="wmd-button wmd-redo-button"></li><li style="background-position: -240px 0px;" class="wmd-button wmd-help-button"><a title="WMD website" target="_blank" href="http://wmd-editor.com/"></a></li></ul></div><div id="wmd-button-bar-2" class="wmd-button-bar"></div><div id="wmd-button-bar-4" class="wmd-button-bar"></div><textarea id="wmd-input" class="resizable" name="post-text" cols="92" rows="15" tabindex="101"></textarea><div id="wmd-preview-4" class="wmd-preview"></div><div id="wmd-preview-2" class="wmd-preview"></div><div id="wmd-preview-0" class="wmd-preview"></div> </div> with ajax form: <div id="wmd-container"> <div id="wmd-button-bar"></div> <div id="wmd-button-bar-1" class="wmd-button-bar"></div><div id="wmd-button-bar-3" class="wmd-button-bar"></div><textarea id="wmd-input" class="resizable" name="post-text" cols="92" rows="15" tabindex="101"></textarea><div id="wmd-preview-3" class="wmd-preview"></div><div id="wmd-preview-1" class="wmd-preview"></div> </div> any help?

    Read the article

  • Request for the permission of type 'System.Web.AspNetHostingPermission' failed when compiling web si

    - by ahsteele
    I have been using Windows 7 for a while but have not had to work with a particular legacy intranet application since my upgrade. Unfortunately, this application is setup as an ASP.NET Website project hosted on a remote server. When I have the website open in Visual Studio 2008 and try to debug it I get the following compiler error: Request for the permission of type 'System.Web.AspNetHostingPermission' failed To resolve this issue on Windows Vista machines, I would change the machine's .NET Security Configuration trust level to full for the local intranet (fix outlined here). I believe this configuration utility relied upon the mscorcfg.msc which from some cursory research appears to be apart of the .NET 2.0 SDK. I have tried to follow the instructions from this Microsoft Support article running the command below to no avail. Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol.exe -m -ag 1 -url "file:////\\computername\sharename\*" FullTrust -exclusive on Presently, I have the following .NET and ASP.NET components installed on my machine Microsoft .NET Compact Framework 2.0 SP2 Microsoft .NET Compact Framework 3.5 Microsoft .NET Framework 4 Client Profile Microsoft .NET Framework 4 Extended Microsoft .NET Framework 4 Multi-Targeting Pack Microsoft ASP.NET MVC 1.0 Microsoft ASP.NET MVC 2 Microsoft ASP.NET MVC 2 - Visual Studio 2008 Tools Microsoft ASP.NET MVC 2 - Visual Studio 2010 Tools Do I need to install the .NET 2.0 SDK? Am I issuing the caspol command incorrectly? Is there something else that I am missing?

    Read the article

  • ASP.NET MVC and WCF

    - by Michael Stum
    I'm working my way into MVC at the moment, but on my "To learn at some point" list, I also have WCF. I just wonder if WCF is something that should/could be used in an MVC Application or not? The Background is that I want a Desktop Application (.NET 3.5, WPF) interact with my MVC Web Site, and I wonder what the best way to transfer data between the two is. Should I just use special Views/have the controllers return JSON or XML (using the ContentResult)? And maybe even more important, for the other way round, could I just call special controllers? Not sure how Authorization would work in such a context. I can either use Windows Authentication or (if the Site is running forms authentication) have the user store his/her credentials in the application, but I would then essentially create a HTTP Client in my Application. So while MVC = Application seems really easy, Application = MVC does seem to be somewhat tricky and a possible use for WCF? I'm not trying to brute-force WCF in this, but I just wonder if there is indeed a good use case for WCF in an MVC application.

    Read the article

< Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >