Search Results

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

Page 65/2373 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • ASP.NET/VB.NET problem solving help!

    - by Jonesy
    Hi folks, Got a problem I need help with. Basically I'm gonna develop a form (part of a bigger web app) that lists a load of clients and there business contact, tech contact 1, and tech contact 2. The idea is rapid data entry. So one form shows each client with their contacts in dropdowns and I we can change each one then click a save button to do a mass save. the database looks like this: tblClient ClientID ClientName BusinessContact Tech1 Tech2 My idea was to use a repeater to format the data like this: Client Business Contact Tech1 Tech2 Client2 Business Contact Tech1 Tech2 What I'm stuck on is how to do the mass update? Can I do something like for each item in Repeater1 then do an update SQL statement? -- Jonesy

    Read the article

  • ASP.NET MVC 2 - Saving child entities on form submit

    - by Justin
    Hey, I'm using ASP.NET MVC 2 and am struggling with saving child entities. I have an existing Invoice entity (which I create on a separate form) and then I have a LogHours view that I'd like to use to save InvoiceLog's, which are child entities of Invoice. Here's the view: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TothSolutions.Data.Invoice>" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> Log Hours </asp:Content> <asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server"> <script type="text/javascript"> $(document).ready(function () { $("#InvoiceLogs_0__Description").focus(); }); </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2>Log Hours</h2> <% using (Html.BeginForm("SaveHours", "Invoices")) {%> <%: Html.ValidationSummary(true) %> <fieldset> <legend>Fields</legend> <table> <tr> <th>Date</th> <th>Description</th> <th>Hours</th> </tr> <% int index = 0; foreach (var log in Model.InvoiceLogs) { %> <tr> <td><%: log.LogDate.ToShortDateString() %></td> <td><%: Html.TextBox("InvoiceLogs[" + index + "].Description")%></td> <td><%: Html.TextBox("InvoiceLogs[" + index + "].Hours")%></td> <td>Hours</td> </tr> <% index++; } %> </table> <p> <%: Html.Hidden("InvoiceID") %> <%: Html.Hidden("CreateDate") %> <input type="submit" value="Save" /> </p> </fieldset> <% } %> <div> <%: Html.ActionLink("Back to List", "Index") %> </div> </asp:Content> And here's the controller code: //GET: /Secure/Invoices/LogHours/ public ActionResult LogHours(int id) { var invoice = DataContext.InvoiceData.Get(id); if (invoice == null) { throw new Exception("Invoice not found with id: " + id); } return View(invoice); } //POST: /Secure/Invoices/SaveHours/ [AcceptVerbs(HttpVerbs.Post)] public ActionResult SaveHours([Bind(Exclude = "InvoiceLogs")]Invoice invoice) { TryUpdateModel(invoice.InvoiceLogs, "InvoiceLogs"); invoice.UpdateDate = DateTime.Now; invoice.DeveloperID = DeveloperID; //attaching existing invoice. DataContext.InvoiceData.Attach(invoice); //save changes. DataContext.SaveChanges(); //redirect to invoice list. return RedirectToAction("Index"); } And the data access code: public static void Attach(Invoice invoice) { var i = new Invoice { InvoiceID = invoice.InvoiceID }; db.Invoices.Attach(i); db.Invoices.ApplyCurrentValues(invoice); } In the SaveHours action, it properly sets the values of the InvoiceLog entities after I call TryUpdateModel but when it does SaveChanges it doesn't update the database with the new values. Also, if you manually update the values of the InvoiceLog entries in the database and then go to this page it doesn't populate the textboxes so it's clearly not binding correctly. Thanks, Justin

    Read the article

  • ASP wizard browser back button

    - by dzajdol
    Hi. I used asp wizard with updatepanel and google map (it works great). Wizard has 3 steps - all work's great, but when i click browser back button steps changed and i lose all previous information. When i click wizard previouse button - i can see my information. i try this: http://dotnetslackers.com/articles/ajax/HandlingTheBackButtonFromServerCode.aspx but ScriptManager1.IsInAsyncPostBack always is false, and a hasn't hisotry - second problem: i want to get all information in this step Maybe some other solutions??

    Read the article

  • Using Javascript to detect when a user has selected an item in an ASP.NET listbox

    - by Amr Bekhit
    Hello all, I am developing an ASP.NET web application that incorporates google maps. I have an ASP.NET listbox on my page which contains a list of items. When the user selects one of the items, I'd like to show this item on the map. The main complication lies in the fact that google maps uses javascript to control it and the listbox is a server control. I can think of two ways to do this. The first would involve the listbox calling a javascript function when the user selects a new item. I can then write this function to perform the necessary map operations. Unfortunately, the OnSelectedIndexChanged property of the listbox doesn't seem to support javascript functions. The second involves wrapping an UpdatePanel around the listbox and getting the listbox to perform a postback. In the SelectedIndexChanged event in VB/C#, I would the need to somehow make a call to a javascript function which would then update the map. Which solution can I use? Thanks --Amr

    Read the article

  • ASP.NET Line Breaks in Title Element

    - by Nathan Taylor
    I'm trying to optimize SEO readability on our websites and one issue I've come across is ASP.NET butchering the title element of my MasterPage. Entered as such in my MasterPage (manually reformatted to remove line breaks caused by the <% %> tags): <title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /> - <%=WebsiteSettings.WebsiteName %></title> This is the output I receive: <title> Home - Website Name</title> As you can see ASP.NET is adding preceding and trailing line breaks where the <asp:ContentPlaceHolder /> is substitute becaused Visual Studio auto-formats <asp:Content /> to start and end with a line break. Obviously, this can be prevented in the Visual Studio formatting options, but this is not ideal because I only would want to remove that behavior for the TitleContent placeholder and not the rest. Is there any way I can ensure my Title is trimmed before it is rendered? I am using MVC so code-behind is not an acceptable option.

    Read the article

  • How will a search engine read data from my Ajax-based webapp?

    - by Jack W-H
    OK, not entirely related to programming, so I'm sorry. But I'd like to know about this: So I've got a webapp. There's one column where a list of results are fetched from the database. When you click one, jQuery fetches the information associated with that result and puts it into the second column - all without a refresh and using Ajax. Is it possible for Google to still read it etc.? I understand it can follow links... but presumably not Javascript actions etc.? If this is the case, what do other Ajax-heavy websites do about search engine optimisation? Jack

    Read the article

  • How to make <asp:Menu and <asp:DropDownList on one line ?

    - by nCdy
    I've tried this : <div id="xDiv" align="left"> <div id="divX" runat="server" style="margin-left:40px; width: 650px;" align="center"> <asp:Menu ID="Menu3" runat="server" Orientation="Horizontal" Width="100%" StaticSelectedStyle-CssClass="StaticSelectedStyle" Height="52px" StaticSubMenuIndent="18px" oninit="Menu3_Init"> <StaticSelectedStyle CssClass="StaticSelectedStyle"></StaticSelectedStyle> <Items> <asp:MenuItem Text="Test" /> </Items> </asp:Menu> </div> <div runat="server"> <asp:DropDownList ID="DropDownList3" runat="server" DataSourceID="SqlDataSource1" DataTextField="RepGroup_Name" DataValueField="RepGroup_ID" Width="162px"> </asp:DropDownList> </div> </div> but it puts DropDownList not to the end of line , it puts it on a new line.

    Read the article

  • Ajax loader image: How to set a minimum duration during which the loader is shown?

    - by whamsicore
    I am using Jquery for Ajax functionality, and using a loader icon to indicate to the user that data is being retrieved. However, I want the user to see the loader icon for at least 1s, even if the data takes less than 1s to retrieve (if more than 1s is required, the loader icon should remain for the entire duration. Here is the code for the loader HTML <img id="loader" src="example.com/images/ loader.gif" style="vertical-align: middle; display: none" /> I am using the Jquery .Ajax function for my data processing.

    Read the article

  • Is .net 4.0 really not capable of sending emails with attachments larger than 3MB's

    - by JL
    I recently had an issue after upgrading my .net framework to 4.0 from 3.5, I did this because in 4.0 the SMTPClient finally sends a QUIT command to the SMTP server. However recently I was most disturbed to run into a base64 decoding issue, when sending out emails with attachments larger than 3MB's using .net v4 smtpclient: System.Net.Mail.SmtpException: Failure sending mail. --- System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Net.Base64Stream.EncodeBytes(Byte[] buffer, Int32 offset, Int32 count, Boolean dontDeferFinalBytes, Boolean shouldAppendSpaceToCRLF) at System.Net.Base64Stream.Write(Byte[] buffer, Int32 offset, Int32 count) at System.Net.Mime.MimePart.Send(BaseWriter writer) at System.Net.Mime.MimeMultiPart.Send(BaseWriter writer) at System.Net.Mail.Message.Send(BaseWriter writer, Boolean sendEnvelope) at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace --- I read this connect bug listing here: http://connect.microsoft.com/VisualStudio/feedback/details/544562/cannot-send-e-mails-with-large-attachments-system-net-mail-smtpclient-system-net-mail-mailmessage and also this bug listing here: http://connect.microsoft.com/VisualStudio/feedback/details/102644/system-net-mail-fails-to-send-index-was-outside-the-bounds-of-the-array So my question is - is .net 4.0 RTM really not capable of such an easy task as sending a message with an attachment larger than 3MB's?

    Read the article

  • why developping ASP.NET - MVC?

    - by sam
    Hi Guys, I am new to web development, I am coding some ASP.NET, I checked a lot of examples using MVC in ASP.NET, But I am looking for verbal answers from senior programmers, about why using MVC? can U as seniors and team leaders show me the benefits?? and why not keeping using asp.net webforms? thanks

    Read the article

  • .NET 2.0 vs .NET 4.0 loading error

    - by David Rutten
    My class library is compiled against .NET 2.0 and works just fine whenever I try to load it as a plugin under the 2.0 runtime. If however the master application is running the .NET 4.0 runtime, I get an exception as soon as the resources need to be accessed: Exception occurred during processing of command: Grasshopper Plug-in = Grasshopper Could not find file 'Grasshopper.resources'. Stack trace: at UnhandledExceptionLogger.UnhandledThreadException(Object sender, ThreadExceptionEventArgs args) at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t) at System.Windows.Forms.Control.WndProcException(Exception e) at System.Windows.Forms.ControlNativeWindow.OnThreadException(Exception e) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.SafeNativeMethods.ShowWindow(Handle Ref hWnd, Int32 nCmdShow) at System.Windows.Forms.Control.SetVisibleCore(Boolean value) at System.Windows.Forms.Form.SetVisibleCore(Boolean value) at System.Windows.Forms.Form.Show(IWin32Window owner) .... What's going on and how do I make my project load on all .NET Runtimes?

    Read the article

  • Removing Database References from an ASP.NET MVC Site

    - by Maxim Z.
    I'm building a very simple ASP.NET MVC site that doesn't require a database and doesn't have user accounts or any other special ASP.NET stuff. When I first created the site with the ASP.NET MVC 1.0 site template in Visual Studio, the web.config page was configured to automatically connect to SQL Server Express as a User Instance. Can I completely remove this dependency? If so, how do I get rid of all this database stuff?

    Read the article

  • How to get an ASP.NET MVC Ajax response to redirect to new page instead of inserting view into Updat

    - by Jeff Widmer
    I am using the Ajax.BeginForm to create a form the will do an ajax postback to a certain controller action and then if the action is successful, the user should get redirected to another page (if the action fails then a status message gets displayed using the AjaxOptions UpdateTargetId). using (Ajax.BeginForm("Delete", null, new { userId = Model.UserId }, new AjaxOptions { UpdateTargetId = "UserForm", LoadingElementId = "DeletingDiv" }, new { name = "DeleteForm", id = "DeleteForm" })) { [HTML DELETE BUTTON] } If the delete is successful I am returning a Redirect result: [Authorize] public ActionResult Delete(Int32 UserId) { UserRepository.DeleteUser(UserId); return Redirect(Url.Action("Index", "Home")); } But the Home Controller Index view is getting loaded into the UpdateTargetId and therefore I end up with a page within a page. Two things I am thinking about: Either I am architecting this wrong and should handle this type of action differently (not using ajax). Instead of returning a Redirect result, return a view which has javascript in it that does the redirect on the client side. Does anyone have comments on #1? Or if #2 is a good solution, what would the "redirect javascript view" look like?

    Read the article

  • VB.NET - ASP.NET - MS-Access - SQL Statement

    - by Brian
    I have a button which when pressed, sets the user's rights in the db. (If Administrator UserTypeID is set to '2' and if Customer it is set to '1'). However when I run the below code, everything remains the same. I think it's from the SQL statement but I;m not sure. Can anyone help please? Protected Sub btnSetUser_Click(sender As Object, e As System.EventArgs) Handles btnSetUser.Click Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Brian\Documents\Visual Studio 2010\WebSites\WebSite3\db.mdb;") Dim cmd As OleDbCommand = New OleDbCommand("UPDATE [User] SET [UserTypeID] WHERE Username=?", conn) conn.Open() cmd.Parameters.AddWithValue("@Username", txtUser.Text) If ddUserType.SelectedItem.Text = "Administrator" Then cmd.Parameters.AddWithValue("@UserTypeID", "2") cmd.ExecuteNonQuery() lblSetUser.Text = txtUser.Text + "was set to Administrator." ElseIf ddUserType.SelectedItem.Text = "Customer" Then cmd.Parameters.AddWithValue("@UserTypeID", "1") cmd.ExecuteNonQuery() lblSetUser.Text = txtUser.Text + "was set to Customer." End If conn.Close() End Sub End Class

    Read the article

  • Question about Architecture for Viewing Images in ASP.NET MVC App

    - by Charlie Flowers
    I have an approach in mind for an image viewer in a web app, and want to get a sanity check and any thoughts you stackoverflowers might have. Here's the whirlwind nutshell summary: I'm working on an ASP.NET MVC application that will run in my company's retail stores. Even though it is a web application, we own the store machines and have control over them. We have a "windows agent" running on the store machine which we can talk to from the browser via javascript (it is a WCF service, and our web app has permission to talk to it from the browser). One of the web pages needs to be an "image viewer" page with some common things like Rotate & Zoom. Now, there are some WebForms controls that offer Rotate and Zoom. However, they take up server resources and generate a good bit of traffic between the server and the browser. For example, the Rotate function would cause an ajax call to the server, which would then generate a new image written to a .NET Canvas object, which would then be written to a file on the server, which would then be returned from the ajax call and refreshed inside the browser. Normally, that's a pretty good way of doing things. But in our case, we have code running on the store machine that we can communicate with. This leads me to consider the following approach: When the user asks to view an image, we tell our "windows agent" to download it from our image server to the store machine. We then redirect our browser to our image viewer page, which will pull the image from the local file we just wrote to the store machine. When the user clicks "Rotate", we cause JavaScript code in the browser to call our "windows agent" software, asking it to perform the "Rotate" function. The "windows agent" does the rotation using the same kind of imaging control that would formerly have been used on the server, but it does so now on the store machine. Javascript in the browser then refreshes the image on the page to show the newly rotated image. Zoom and similar features would be implemented the same way. This seems to be much more efficient, scalable, and responsive for the end-users. However, I've never heard of anything like it being done, mostly because it's rare to have this combination of a web app plus a "windows agent" on the client machine. What do you think? Feasible? Reasonable? Any pitfalls I overlooked or improvements / suggestions you can see? Has anyone done anything like this who would like to offer the wisdom of experience? Thanks!

    Read the article

  • get data from asp page

    - by sam
    I am wondering if there is anyway to grab the html that is generated from an ASP page. I am trying to pull a table from the page, and I foolishly used a static html page so I would not have to be constantly querying the server where this page resides while I tested out my code. The javascript code I wrote to grab to unlabeled table from the page works. Then when I put it into practice with the real page and found that the ASP page does not generate a viewable page with a jquery .get request on the URL. Is there any way to query the page for the table I need so that the ASP page returns a valid page on request? (I am also limited to using javascript and perl for this, the server where this will reside will not run php and I have no desire to learn ASP.NET to solve this by adding to the issue of proprietary software)

    Read the article

  • why developing ASP.NET - MVC?

    - by sam
    Hi Guys, I am new to web development, I am coding some ASP.NET, I checked a lot of examples using MVC in ASP.NET, But I am looking for verbal answers from senior programmers, about why using MVC? can U as seniors and team leaders show me the benefits?? and why not keeping using asp.net webforms? thanks

    Read the article

  • Automated login on ASP.NET website with C#

    - by user293995
    Hi, I have to login with a username / password with a c# program with asp.net form. I have already do that with HttpUtility on PHP website but how to do that with ASP.NET website ? In ASP.NET, I must handle postback and so on... Any ideas ? Thanks in advance Best regards

    Read the article

  • asp.net mvc3 return multiple json list

    - by Acid
    Im asp.net mvc3 c# code returns json list like this: return Json(new { name = UserNames, imageUrl = ImageUrls }); UserNames and ImageUrls are both List types And this is my jquery function StartSearch(text) { $.ajax({ url: '/Shared/Search', type: 'POST', data: { SearchText: text }, dataType: 'json', success: function (result) { $.each(result, function (i, item) { alert(result[i].name); }); } }); } How i can get names and umageUrls? Thanks

    Read the article

  • Asp.net MVC Ajax form that return Json to a javascript method.

    - by Diego Correa
    Hello guys, I have an ajax form that saves a object in the database then return a Message like this: return Json(new {Message = "Message!"}, JsonRequestBehavior.AllowGet); We are ok here, but I don't know HOW I'll get this result in the view to display in a jQuery modal. My ajax form is like the following and I want to get the result on the OnSuccess method: <%using (Ajax.BeginForm("Form", "Controller", new AjaxOptions() { OnSuccess = "MethodThatIWantToGetTheJson" })) Any ideas?

    Read the article

  • How to incorporate jquery menu with asp.net membership

    - by wonde
    Hi guys, I am using Asp.net menu control for the web site that I am currently building and I am thinking to change to work with jQuery menu. So the current menu (Asp.net menu control) works with asp.net membership as many of knew.And the menu changed based on the role of the user who logged in. Is it possible to change the menu control to jQuery menu,with out affecting the membership functionality ?

    Read the article

  • Server.Execute - render .ASP from MVC controller action

    - by David Lively
    I need to render an ASP page to a string from an MVC controller action. I can use Server.Execute() to render a .aspx page, but not a .asp page. Here's what I'm using: public ActionResult Index() { Server.Execute("/default.asp"); return new EmptyResult(); } which returns `No http handler was found for request type 'GET'` Any suggestions? I can do something similar with with a web request, but I'd rather avoid the overhead of a loopback request.

    Read the article

  • Export the datagrid data to text in asp.net+c#.net

    - by SRIRAM
    Problem:It will asks there is no assembly reference/namespace for Database Database db = DatabaseFactory.CreateDatabase(); DBCommandWrapper selectCommandWrapper = db.GetStoredProcCommandWrapper("sp_GetLatestArticles"); DataSet ds = db.ExecuteDataSet(selectCommandWrapper); StringBuilder str = new StringBuilder(); for(int i=0;i<=ds.Tables[0].Rows.Count - 1; i++) { for(int j=0;j<=ds.Tables[0].Columns.Count - 1; j++) { str.Append(ds.Tables[0].Rows[i][j].ToString()); } str.Append("<BR>"); } Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=FileName.txt"); Response.Charset = ""; Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.ContentType = "application/vnd.text"; System.IO.StringWriter stringWrite = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); Response.Write(str.ToString()); Response.End();

    Read the article

  • What's the Microsoft Ajax equivalent to jquery.ajaxSetup() or .ajaxError()?

    - by Seth Petry-Johnson
    I have an ASP.NET MVC site that uses both Microsoft Ajax [Ajax.BeginForm()] and jQuery to make asynchronous requests. I want to configure both frameworks such that a generic error handler is automatically attached if the developer does not explicitly specify a failure callback. In jQuery I can accomplish this with either .ajaxSetup() or .ajaxError(). What is the equivalent in the Microsoft Ajax client library? I'm fairly sure it's something in the Sys object but I can't find it...

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >