Search Results

Search found 53356 results on 2135 pages for 'net j2ee interoperabilit'.

Page 122/2135 | < Previous Page | 118 119 120 121 122 123 124 125 126 127 128 129  | Next Page >

  • ASP.net web page still displaying cached versions

    - by user279521
    My web page is still displaying a previously cached versions of the page. I have this in the page_load event: Response.Clear(); Response.Buffer = true; Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d); Response.Expires = -1; Response.CacheControl = "no-cache"; Response.Cache.SetCacheability(HttpCacheability.NoCache); I have this in the Page_Init: protected void Page_Init(object Sender, EventArgs e) { Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Cache.SetExpires(DateTime.Now.AddDays(-1)); } Any idea what I might be missing?

    Read the article

  • how to display using asp.net mvc

    - by kumar
    I have a partial view called StudentInfo.ascx. In it I have something like this: <fieldset> <legend>Students Information</legend> <div> <label>First Name:</label> <label>Last Name:</label> </div> </fieldset> I have another partial view called Detail.ascx which will need to display this StudentInfo.ascx. I did something like this: <%= Html.RenderAction("StudentInfo"); %> Is that right?

    Read the article

  • How to page multiple data sets in ASP.NET MVC

    - by REA_ANDREW
    On a single view I will have three sets of paged data. Which means for each model I will have The Objects The Page Index The Page Size My initial thought was for example: public class PagedModel<T> where T:class { public IList<T> Objects { get; set; } public int ModelPageIndex { get; set; } public int ModelPageSize { get; set; } } Then having a model which is to be supplied to the action as for example: public class TypesViewModel { public PagedModel<ObjectA> Types1 { get; set; } public PagedModel<ObjectB> Typed2 { get; set; } public PagedModel<ObjectC> Types3 { get; set; } } So if I then for example have the Index view inherit from the type: System.Web.Mvc.ViewPage<uk.co.andrewrea.forum.Web.Models.TypesViewModel> Now my initial aciton method for the index is simply: public ActionResult Index() { var forDisplayPurposes = new TypesViewModel(); return View(forDisplayPurposes); } If I then want to page, it is here where I am struggling to decide which action to take. Lets say that I select the next page of the Types2 PageModel. What should the action look like for this in order to return the new view showing the second page of the Types2 PageModel I was thinking possibly to duplicate the action but use it with POST [AcceptVerbs(HttpVerbs.Post)] public ActionResult Index(TypesViewModel model) { return View(model); } Is this a good way to approach it. I understand there is always Session, but I was just wondering how such a thing is achieved currently out there. If any best methods have been mutually accepted and things. So simply, one page with multiple paged models. How to persist the data for each using a wrapper model. Which way should you pass in the model and which way should you page the data, i.e. Form Post Lastly, I have seen the routes take this into account i.e. {controller}/{action}/{id}/{pageindex}/{pagesize} but this only accounts for one model and I do not really wwant to repeat the pagesize and pageindex values for the number of models I have inside the wrapper model. Thanks for your time!! Andrew

    Read the article

  • asp.net viewdata

    - by mazhar
    public ActionResult AddDinner() { Dinner dinner = dinnerRepository.GetDinner(id); ViewData["dinner"] = repository.AllDinners(); return View(dinner); } 1) First of all both the dinner object and the ViewData["dinner"] is passing to the view? 2) Secondly how would I iterate over the ViewData["dinner"] in the view?

    Read the article

  • Downloading files in ASP.Net MVC web applications

    - by kingrichard2005
    Hello, I'm working on a project that requires the ability to let a user download a pdf from a static location on the server. I'm reading the instructions from this website, it's an old post and I notice they specify in an update that Microsoft's MVC framework has long since included and Action Result that allows the same functionality they discuss thus rendering it obsolete, I've looked a bit online but haven't been able to find any resources that discuss this built-in functionality. If anyone has any links or other information that discuss this it would be very helpful. Thanks.

    Read the article

  • ASP.NET C# Application Object Getters and Setters

    - by kellax
    I have had a hard time finiding a newbie friendly example of accessing Application Object. I have few things ( arrays ) i would like to store in Application Object to keep as persistant data for about 2h till AppRecycle Anyhow i know how to set an Application Object variable this way: // One way String[] users = new String[1000]; Application["users"] = users; // Another way Application.Add("users", users); However i do not know how to access these variables once in Application Object there is a Getter method Get however it requires int index and other one Contents which get's everything. Here i try to retrive my String[] array but gives me a error that i am trying to convert Object to String. String[] usersTable = Application["users"]; // Since this is an object i also tried Application.users but gives error

    Read the article

  • ASP.Net MVC - bulk / batch insert with through controller

    - by user610358
    guys, I need to make a view which will support bulk insert. In my mvc app, I am using repository patern with entity framework for. I am only having problem on how I will going to retrive the values of the model. There will be multiple model inpouts inside the view. I am sure that I am going to use foreach or for loop but how I am going to retrive the input values form view into controller. any help would be appreciated. thanks.

    Read the article

  • Validation error language in asp.NET dynamic data WEB-site

    - by loviji
    Hello, I need to change language of validation error to another language. Validation logic must not be changed. I just want to translate The field f5080eb8_0a83_4b89_b339_233528441711 must be a valid integer. into another language. For example from English into Italian. I search in my project for this text, result=0. So, what is the best way to translate validation error text into another language? Some ideas, thanks!

    Read the article

  • Need help regarding query string in asp.net

    - by vaibhav
    I have a page create-quote.aspx. I want to open this page in different modes, depending on whether a querystring parameter is present or not. My question is at which event should I check, If I have a querystring parameter or not. I think, it should be preinit, what do you say.

    Read the article

  • How do you pass a generic delegate argument to a method in .NET 2.0

    - by Seth Spearman
    Hello, I have a class with a delegate declaration as follows... Public Class MyClass Public Delegate Function Getter(Of TResult)() As TResult 'the following code works. Public Shared Sub MyMethod(ByVal g As Getter(Of Boolean)) 'do stuff End Sub End Class However, I do not want to explicitly type the Getter delegate in the Method call. Why can I not declare the parameter as follows... ... (ByVal g As Getter(Of TResult)) Is there a way to do it? My end goal was to be able to set a delegate for property setters and getters in the called class. But my reading indicates you can't do that. So I put setter and getter methods in that class and then I want the calling class to set the delegate argument and then invoke. Is there a best practice for doing this. I realize in the above example that I can set set the delegate variable from the calling class...but I am trying to create a singleton with tight encapsulation. For the record, I can't use any of the new delegate types declared in .net35. Answers in C# are welcome. Any thoughts? Seth

    Read the article

  • DrawString only works in top-left part of form vb.net

    - by WillumMaguire
    Here is my code Public Class Form1 Public MyFormObject As Graphics = Me.CreateGraphics Public objFont = New System.Drawing.Font("arial", 20) Public a, b As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Randomize() For i = 1 To 10 a = CInt(Int(Rnd() * Me.Width)) b = CInt(Int(Rnd() * Me.Height)) MyFormObject.DrawString("text", objFont, System.Drawing.Brushes.Black, a, b) Next End Sub End Class As you can see, I have one button that draws the string "text" randomly in the form 10 times. My problem is that it will ONLY draw the string in the upper-left portion of the form, roughly 260x260 starting at 0,0. It literally cuts off the text if it goes beyond. Why is this? Shouldn't it work for the entire form?

    Read the article

  • .NET platform independant sync framework

    - by Quandary
    Question: I need to synchronize a few ActionScript files from my computer to a network share (backup). I saw a quick fix would be using Microsoft Sync Framework for this, and write a windows service. My problem is I also use Linux, and before I start with MS vendor lockin, is there any sync framework/library/whatever I could use that works accross platform? Or does the MS sync framework work on Linux, too? It is my understanding that it is a wrapper around some com objects, thus it wouldn't work. All I need is synchronizing files. So never mind the database part, although it would be nice to have it, too.

    Read the article

  • ASp.Net MVC routing

    - by suneehs
    Hi, I am using MVC 2.0 to create my application,my problem i s related to the routing. Actually in my application each user have required seperate subdomain,like www.example.com/user1/ ,www.example.com/user2/ ...etc.the default domain is www.example.com.So how can i make it possible with routing in mvc. i have tried like this, routes.Add(new Route( "{id}", new RouteValueDictionary( new { controller = "User", action = "login", id = " " } ), new MvcRouteHandler())); var defaults = new RouteValueDictionary( new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); routes.Add(new Route( "{controller}/{action}/{id}", defaults, new MvcRouteHandler())); But the problem is that it take deafult (www.example.com) directly to user login page.I want the default page as Home/index and when www.example.com/user1/ it will go to user login page.Is there any way ..pls help me

    Read the article

  • Forcing A Postback Asp.Net

    - by Nick LaMarca
    Please take a look at the following click event... Protected Sub btnDownloadEmpl_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDownloadEmpl.Click Dim emplTable As DataTable = SiteAccess.DownloadEmployee_H() Dim d As String = Format(Date.Now, "d") Dim ad() As String = d.Split("/") Dim fd As String = ad(0) & ad(1) Dim fn As String = "E_" & fd & ".csv" Response.ContentType = "text/csv" Response.AddHeader("Content-Disposition", "attachment; filename=" & fn) CreateCSVFile(emplTable, Response.Output) Response.Flush() Response.End() lblEmpl.Visible = True End Sub This code simply exports data from a datatable to a csv file. The problem here is lblEmpl.Visible=true never gets hit because this code doesnt cause a postback to the server. Even if I put the line of code lblEmpl.Visible=true at the top of the click event the line executes fine, but the page is never updated. How can I fix this?

    Read the article

  • asp.net formatting an email

    - by user279521
    I am working on an application that involves the user clicking on a hyperlink to popup an outlook email template. I have the SendTo values, and the subject values. How do I enter text into the body of the email?

    Read the article

  • ado.net data entity problem

    - by ognjenb
    I have this error Cannot implicitly convert type 'System.Linq.IQueryable' to 'Mvc.Models.engineer'. An explicit conversion exists (are you missing a cast?) after write this code engineer Ing = new engineer(); Ing = from j in testPersons.ibekoengineer select j.Name; What is wrong?

    Read the article

  • VB.NET Update Access Database with DataTable

    - by sinDizzy
    I've been perusing some hep forums and some help books but cant seem to get my head wrapped around this. My task is to read data from two text files and then load that data into an existing MS Access 2007 database. So here is what i'm trying to do: Read data from first text file and for every line of data add data to a DataTable using CarID as my unique field. Read data from second text file and look for existing CarID in DataTable if exists update that row. If it doesnt exist add a new row. once im done push the contents of the DataTable to the database. What i have so far: Dim sSQL As String = "SELECT * FROM tblCars" Dim da As New OleDb.OleDbDataAdapter(sSQL, conn) Dim ds As New DataSet da.Fill(ds, "CarData") Dim cb As New OleDb.OleDbCommandBuilder(da) 'loop read a line of text and parse it out. gets dd, dc, and carId 'create a new empty row Dim dsNewRow As DataRow = ds.Tables("CarData").NewRow() 'update the new row with fresh data dsNewRow.Item("DriveDate") = dd dsNewRow.Item("DCode") = dc dsNewRow.Item("CarNum") = carID 'about 15 more fields 'add the filled row to the DataSet table ds.Tables("CarData").Rows.Add(dsNewRow) 'end loop 'update the database with the new rows da.Update(ds, "CarData") Questions: In constructing my table i use "SELECT * FROM tblCars" but what if that table has millions of records already. Is that not a waste of resources? Should i be trying something different if i want to update with new records? Once Im done with the first text file i then go to my next text file. Whats the best approach here: To First look for an existing record based on CarNum or to create a second table and then merge the two at the end? Finally when the DataTable is done being populated and im pushing it to the database i want to make sure that if records already exist with three primary fields (DriveDate, DCode, and CarNum) that they get updated with new fields and if it doesn't exist then those records get appended. Is that possible with my process? tia AGP

    Read the article

  • .Net in HTML tp return true if reader object not null, otherwise return false

    - by Phill Healey
    I'm using a DataList to show some data from the database and populating the fields on the html side. I now have a requirement to change the visibility of a panel based on whether or not a db field has data or not. I need to be able to show the panel if the relevant data field has content, and hide it if it doesn't. Eg: <asp:Panel ID="pnlNew" runat="server" Style="margin:0; padding:0; width:42px; height:18px; bottom:5px; right:10px; float:right; position:relative; background:url(../_imgVideoBadge.png) no-repeat;" Visible='<%# Eval("cheese") != null %>' ToolTip="available"></asp:Panel> Obviously this doesn't work in terms of the visible property. But hopefully it gives an idea of what I'm trying to achieve. Any help would be greatly appreciated. I've seen examples previously of doing something along the lines of: a ?? b:c How could this be applied to the above requirement?? Thanks in advance.

    Read the article

  • ASP.NET Custom Control - Default Template?

    - by Bob Fincheimer
    I know this is really picky, but can I have one template inside a user control: <uc:MyUserControl runat="server" ID="test"> <div><b>Test</b></div> <asp:PlaceHolder runat="server" id="pH" /> </uc:MyUserControl> Instead of what I have now which requires me to: <uc:MyUserControl runat="server" ID="test"> <Content> <div><b>Test</b></div> <asp:PlaceHolder runat="server" id="pH" /> </Content> </uc:MyUserControl> Basically I want my control to have only one ITemplate inside of it.

    Read the article

  • VB.net save opened word document!

    - by comii
    Hi! I just trying to made word add-ins that gone save opened document.I made ribbon and button on it.Below is the that i use for saving word document on certain location: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs) Handles Button1.Click Dim ThisApplication As Word.Application ThisApplication.ActiveDocument.SaveAs("C:\email") ThisApplication.Quit() ThisApplication= Nothing End Sub But when i click on this button i just made email.doc but that document does not contain any content of the opened document, it just made new doc file. What i am doing wrong? The event on this button need to just same as event on standard Word save button, so how i can do this?

    Read the article

  • Deserialising Json to derived types in Asp.Net Web API

    - by IoChaos
    I'm calling a method of my WebAPI sending a json that I would like to match (or bind) with a model. In the controller I have a method like: public Result Post([ModelBinder(typeof(CustomModelBinder))]MyClass model); 'MyClass', wich is given as a parameter is an abstract class. I would like that at, depending of the type of json passed, the correct inherited class is instantiated. To achieve it, I'm trying to implement a custom binder. The problem is that (I don't know if it's very basic but I can't find anything) I don't know how to retrieve the raw Json (or better, some kind of serialization) that comes in the request. I see: actionContext.Request.Content But all methods are exposed as async. I don't know who this fits with passing the generate model to the controller method... Thanks a lot!

    Read the article

< Previous Page | 118 119 120 121 122 123 124 125 126 127 128 129  | Next Page >