For my blog I am wanting to use the Output Cache to save a cached version of a perticular post for around 10 minutes, and thats fine...
<%@OutputCache Duration="600" VaryByParam="*" %>
However, if someone posts a comment, I want to clear the cache so that the page is refreshed and the comment can be seen.
How do I do this in ASP.Net C#?
Hello
I have a "service-layer" in my application that handles some logic that uses a "data-layer" that has dataannotations and uses a resource-file with "error-messages" in different languages.
How should I implement it in my asp.net mvc application that needs to display some message if a login fails, or if firstname is missing etc?
/M
Sounds dummy but I can't set to a server-side control's property a value contains quote marks ":
<asp:CompareValidator ErrorMessage="Curreny-from can't be equal to currency-to" runat="server" />
I need to quote "from" and "to".
I tried escaping \"from\" and double quote marks ""from"" - both doesn't work. How to do that?
I am using ASP.NET Callbacks (that implements the ICallbackEventHandler) and in the handler, I try to set a value of the text box:
txtName.text = "Test";
but this value is not set. Is this a limitation with callback? It appears I cannot do much in a callback handler other than sending back a string to the client side (ofcourse I can access the Session etc)
Is it possible for an user control (ascx) to doing something like herit from a MasterPage ?
My point is, in one of my user control (only use by one kind of MasterPage), I would like to use an <asp:content> tag, but I can't, I can only in the page that use that user control...
So, I have to repeat some code into each of the page that use that user control...
Hello,
I am developing a website that has nested categories. I would like the categories to be in the url such as something like this
http://www.dmoz.org/Computers/Programming/Component_Frameworks/NET/Chats_and_Forums/
as you can see in the above url the categories are in the url itself. How can I develop something like this in asp.net mvc?
We are implementing a single sign on mechanism in an enterprise environment, where the token is shared between applications using HTTP header. Now, in order to do the integration test, I need to write an application to simulate this.
Is there any way in ASP.NET where I can redirect to another web-page and pass a custom HTTP header in the process?
Thanks
Hi All,
I am using asp.net with C# [3.5]. I want to display Image before my URL in browser, like IE and mozilla used to have. I want to display my custom image.
Please help.
Thanks in advance
Why isn't this working?
<ajaxToolkit:TabPanel Enabled='<%# User.IsInRole("admin") %>'...
While this works:
<asp:TextBox Enabled='<%# User.IsInRole("admin") %>'...
I created image from byte array
System.Drawing.Image newImage;
using (MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length))
{
ms.Write(imageBytes, 0, imageBytes.Length);
newImage = System.Drawing.Image.FromStream(ms, true);
}
and now I need to have this image as a source for asp:Image (System.Web.UI.WebControls.Image). Is this possible as I know that conversion is impossible?
I have this exception
i have a asp.net gridview with select edit and delete button when i click edit or delete i have this bug. the gridview is inside a update pane
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The GridView 'combinationViewGridView' fired event RowEditing which wasn't handled.
any ideas
The MSDN documentation for using an asynchronous controller mentions choosing an asynchronous controller when you want to provide a way for users to cancel requests.
I couldn't find any documentation related to actually allowing users to cancel asynchronous requests, however. Is there a way to indicate to ASP.Net and/or the MVC framework that a request should be canceled?
Using ASP.NET and the DataGrid, how do I bind a HyperLinkColumn to more than one field?
Dim detail As New HyperLinkColumn
With detail
.Text = "View Details"
.HeaderText = ""
.NavigateUrl = "\TeamDetail.aspx?Account={0}&Broker={1}"
.DataNavigateUrlField = "AccountKey, BrokerNumberKey"
End With
I was hoping for an data-binding event on HyperLinkColumn but no such luck.
I need to create a View (ASP.NET MVC with ADO.NET entity model) that consists of three tables that interact with each other. I tried with partial but failed. Any solution for this problem?
Hi,
I have an ajax web application(asp.net). some of users report the a problemt that when they work sometimes by system ( and pages who have ajax calls) their connection to server will intrupt and just a blank page they will see.
they can't browse any other page on my site while they close all open browsers and reopen site.
Is there any idea about this and how can I fix it?
thanks
Mehdi
Hi: Am trying to understand the ASP.NET MVC ViewData with respect to its size. Since this object is passed between Controller to View, how big this could be? Say for example, if DataTable is passed from Model, and Controller is going to pass it to View. Is there any best practices OR any one had any bad experience to share here?
Thanks in advance.
Hi,
I'm reading an excel file using oledb in my asp.net code (vb).
I have no problem going over the data but in one of the cells there is a string that "hides" a hyperlink. I want that hyperlink and not the string...
Any ideas?
Thanks
Hi All
There is Role Management feature in ASP.NET
It works on local development machine.
For our project we need customers admin to be able to create new users and manage their roles.
So, basically same what aspnet_regsql.exe does.
Question is
Should we develop our own pages and forms or use some ready made tool?
Thanks!
With windows and sql server accounts, I can access the logged in user with functions like: user_name() or suser_sname().
Can I access the user that is logged into asp.net in the same way?
In an ASP.NET 3.5 website we are noticing that the back button is not working properly. If the user does several postbacks (say 10 times), and than starts pressing back button - the back button gets disabled before the user gets through all the pages. The site does not use AJAX.net.
Using the asp.net file upload control is very easy, i'm trying to squeeze it into my site and the dam thing is very ugly!. Can I not change the browse button to an image of my choosing ?
So far i'm failing to achieve this seemingly simple goal. Any ideas on this one ?
Thanks