I'm trying to create a member page for updating account details. I want to populate a form with the member's data, but I don't know how to set a filter on the EntityDataSource to limit the query.
When I set the select statement based on the member ID, I get the error
Select cannot be set if EnableDelete, EnableInsert, or EnableUpdate...
Somehow this update code is not working:
Here is my Controller code:
private UserRepository repo = new UserRepository();
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(int id, UserInfo user_)
{
try
{
repo.UpdateUser(user_);
return RedirectToAction("Index");
}
...
Hi,
I am using the AES methods here: http://msdn.microsoft.com/en-us/library/system.security.cryptography.rijndaelmanaged.aspx
I want to have a string value that I will convert to byte array and pass it to the AES encrypt method. How many characters should the string be to produce the correct byte array size that the method expects?
...
I have SSRS report with its own datasets coming straight from the database. I have the report on ASP.NET application page.
The application page header has the username and user region details defined in the master page.
Now, I want to read this region id label from the ASP.NET page and build my report accordingly. Basically build...
I just wanted to clarify a few questions I have. I'm building a JSON string and returning it using context.response. I'm just calling a url to an .ashx handler and trying to return JSON.
Here's how I have approached it so far:
List products = GetCarolProducts();
List images = new List();
foreach(Product p in products)
{
stri...
I'm sending back a bunch of image tags via JSON in my .ashx response.
I am not sure how to format this so that the string comes back with real tags. I tried to HtmlEncode and that sort of fixed it but then I ended up with this stupid \u003c crap:
["\u003cimg src=\"http://www.sss.com/image/65.jpg\" alt=\"\"\u003e\u003c/li\u003e","...
Hi I use a custom MembershipProvider.
I want to know the current username during an application scenario, but when I try accessing HttpContext.Current.User.Identity.Name it always returns string.Empty.
if (Membership.ValidateUser(tbUsername.Text, tbPassword.Text))
{
FormsAuthentication.SetAuthCookie(tbUsername.Text, true);
bool...
How can I HtmlEncode my JSON from within my .ashx?
context.Response.Write(HtmlEncode(jsonString));
I added System.Web.HttpUtility using to the top of my .ashx but no luck
...
I have a dropdown list (FK) which I would like to set and display a default value based on a login userid. Can you please tell me how to do it? I only want to affect the dropdown filter that appear at the top above the Gridview.
Thanks
Nikos
...
Hi, We had an asp.net 1.1 application that we recently migrated to 3.5. We are facing some problems when we do code modification on the migrated application. Here is what is happening
In the asp.net 1.1 application we have the page directive codebehind="ePC.aspx.cs". This migrated fine.
We made some code changes to the .cs file. Say fo...
I want to have a look at the code in sample/demo websites to improve my knowledge. it would be great to see a function of a website and then be able to see how the code makes it happen. I am not so concerned with the css or html more the vb.net or c#.
Are there any good sites that have a selection of different types of websites that can...
Hello everyone,
I am reading from the following link,
http://reddnet.net/code/asp-net-web-site-vs-web-application-project-part-2/
My two confusions,
What is the so-called issue "No control over your namespaces" cons from a web site project? Could anyone show me a sample to illustrate this issue please?
What is the so-called issue "I...
I am having some trouble getting Elmah to work with url routing in an asp.net webforms application. Elmah is mapped to "elmah.aspx" and I have tried a couple of variations on:
routes.Add(new Route("elmah.aspx", new StopRoutingHandler()));
Is there a way I can ignore all .aspx pages?
...
Hello,
is there some way to force the gridview's pager to show up, even when there is only one page of data on screen?
I'm building a gridview-based control with a custom pager (w/dropdown for pagesize) and everything is working fine, except when user selects pagesize that is larger than the current row count of the grid. At that point...
We have to deploy our application on a Windows 2008 64 bit server. As the application is already running for over one year on a Windows 2003 server installation, we know everything is working fine. We are still developing on Windows XP.
But installing it on a Windows 2008 64 bit system make me feel a little bit uneasy.
So are there any...
Hi,
I am getting "Out of memory exception" when assigning values in session variables.
The session values are maintained in stateserver.
How to increase the size of the session stateserver memory? or any other option?
Thanks,
P.Gopalakrishnan.
...
I am using the embedded client/server version of db4o (I called OpenServer() instead of OpenFile() method) so that I can host an asp.net website that will have several users reading and writing to the database simultaneously. The only issue is that the webhost that we use is a medium trust environment so it's throwing an error stating t...
Hi,
I have a page that has fields dynamically loaded via JQuery. It allows a user to add additional fields and data on the fly.
Currently that data is collected via JQuery and sent via an Ajax request to be dealt with.
But is there anyway of doing this in a normal action post? Currently it seems that the dynamically inserted fields are ...
I have been attempting to get log4net logging in my asp.net web application with no success or any noticable errors. I am attempting to use the ADONetAppender appender with the following config:
<log4net>
<appender name="ADONetAppender" type="log4net.Appender.ADONetAppender">
<bufferSize value="1" />
<connectionType value="System.Da...
I am struggling to find a way of implementing a tab style menu system in ASP.net. The tabs look great from the HTML/CSS standpoint and are implemeted in the Master page so I don't have access to the body tag from the content page. what I am trying to work out is how to vary the "active tab" based upon the page the user is accessing.
I c...