I have a GridView populated from an ObjectDataSource with two items in its DataKeyNames field. One is the primary key, ID, the other is a category field (the category field is used to add header rows to delineate categories).
Displaying works fine, but I'm trying to create a Delete action. The object's delete method only needs the ID ...
Simple case:
i put a DataTable in Cache
DataTable table = SomeClass.GetTable();
Cache["test"] = table;
then in later calls i use
DataTable table = (DataTable)Cache["test"];
now the question is: should i call table.dispose() on each call, though its stored in the Cache? Means the object is always the same? Or will Cache create a copy...
I want to do a simple role authentication in .NET - but am lost in the profusion of apis...
I would like to have a web.config per directory with role access like:
<authorization>
<allow roles="admin"/>
<deny users="*"/>
</authorization>
And in my login page, where I do FormsAuthentication.RedirectFromLoginPage I want to speci...
Hi All,
I am looking to make a web control where I can register client startup scripts inline with my aspx because I hate registering in the codebehind!
An example of what I have so far:
<Ben:StartupScript runat="server">
var form = document.getElementById("<% =form1.ClientID %>");
</Ben:StartupScript>
Currently, I am overriding th...
I am currently storing many different types of objects in the ASP.NET HttpRuntime.Cache and I was wondering if there is a way to figure out how big each object is?
...
What is prefered way of setting html title (in head) for view when using master pages?
One way is by using Page.Title in .aspx file, but that requires in master page which can mess with HTML code. So, lets assume no server side controls, only pure html. Any better ideas?
UPDATE: I would like to set title in view NOT in the controller...
I know that most people recommend using HttpRuntime.Cache because it has more flexibility... etc. But what if you want the object to persist in the cache for the life of the application? Is there any big downside to using the Application[] object to cache things?
...
I have an asp.net mvc app running on a local iis website that is failing to send mail using SmtpClient from System.Net.Mail. I am trying to send a mail to my hotmail address and I get a socket exception. Any idea what the problem might be?
using(var message = new MailMessage())
{
message.From = new MailAddres...
I am actually not able to install any windows feature through the "Turn Windows features on or off" dialog. I am trying to get ASP.NET working for IIS7 on Vista Ultimate.
I also tried running aspnet_iisreg -i but got an unspecified error.
I checked several places and none of the solutions worked. They mostly had to do with duplicat...
I am trying to find out how to use usercontrols in asp.net mvc. I know how to add a usercontrol to a view and how to pass data to it. What I haven't been able to figure out is how do you do this without having to retrieve and pass the data in every single controller?
For example, if I have a user control that displays the most recent ...
Say I have a controller with an Index Method and a Update Method. After the Update is done I want to redirect to Index(). Should I use return RedirectToAction("Index") or can I just call return Index()? Is there a difference?
public ActionResult Index()
{
return View("Index", viewdata);
}
public ActionResult Update()
{
// do update...
I have an ASP.NET page that uses a repeater nested within another repeater to generate a listing of data. It's to the effect of the following:
<asp:Repeater>
<ItemTemplate>
<span><%#Eval("Data1") %></span>
<!-- and many more -->
<asp:Repeater DataSource='<%#Eval("Data2")%>'>
<HeaderTemplate>
...
I have designed one web page in asp.net. In that i have used the css file and excel generation button. While i am cliking the button for populating the data from database to excel. It is showing the problem in uploading the css file like that .What will i do the for removing the that error.
For opening the excel sheet I have used the fo...
I'm planning to write a aspx pages on Windows XP machine. I have IIS 7.0 enabled and virtual directory setup. Are aspx page developments allowed on Win XP?
...
hello guys
iam working on some sort of crm application which has huge sales data with all the customer leads etc (ASP.net 2.0/AJAx)
i want to create a dashboard which will have four separate data containers each container will have different sort of data and each container has to update it self after some configred time interval . so ...
I'm in the middle of building a pretty big site using asp.net (forms if it's of any interest), and I'm wondering if i need a logging framework such as log4net.
I've used such frameworks before, but i don't see how i could put it to any use in this type of project.
usually i think logging is needed for customer delivered application, wher...
I have a DAL that I want to return an ADODB.recordset when executed from a classic asp. The object is exposed as a com object and I have a complete dal workin but I am not sure how to return an object that is a recordset that .net can use.
Any help would be aprcitated. Thank you!
--Nicolas
...
In standard ASP.net applications ASP.net offered some protection from XSS attacks with validateRequest throwing detect dangerous input errors if some one tried to. This functionality seems to have been taken out of MVC any idea why?
Thanks,
Alex
...
I have a web app which queries a Lucene index and it works just fine in a W2K3 server in my network. Now I got my azure code so I wanted to test the service uploading the app. In order to do that I had to install Vista (I did it in a Virtual machine) cause the Azure SDK won't install on an XP box.
I created my Cloud Service, added the ...
I Use codes below to see a result like picture 1, but a result like picture 2 is coming. What should be done to solve it?
aspx code:
<asp:datalist id="dtlUrun" runat="server" RepeatDirection="Horizontal">
<ItemTemplate>
<table class="dtlTable">
<tr>
<td class="dtlHeader"></td>
<td class="dtlHeader"><%#DataBinder...