I have a dropdownlist, and a Gridview where one of the columns is a dropdownlist.
both dropdown lists use the same data source.
When a value is selected in the dropdownlist (outside the gridview) I want to chaneg the selectedValue and selectText of every dropdownlist in my gridview.
This is what I have tried:
Dropdownlist:
<asp:Drop...
When a user log into my asp.net site I use the following code:
FormsAuthentication.RedirectFromLoginPage(userid, false);
As I often need to use the userid I can then later get the userid by:
string userid = System.Web.HttpContext.Current.User.Identity.Name;
Now I also want to show the logged in username on each page and my question...
Can anyone give me an example for encrypt and decrypt an image using .net with asp.net
I want this encryption to the image when I save it into sql server as binary data.
...
Since installing the security patch for the ASP.NET Oracle Padding vunerability any user that was keeping themselves logged in to our site is getting error messages when hitting any page.
The errors logged on the server are
System.Web.UI.ViewStateException: Invalid viewstate.
Client IP: xxx.xxx.xxx.xxx
Port: 55796
User-Agent: Mozilla/...
I have been tasked with a project where I am to add a new application and have it within an older application (web applications). This is an internal application and management decided that they want it wrapped in this older app. The older application is a ASP.net web app using the 3.5 framework.
My original plan was to use jQuery and...
I’m trying to set up .NET tracing. I’m able to get basic tracing to work via System.Diagnostics.Trace, but for complicated reasons I have to activate tracing via System.Diagnostics.TraceSource objects (the new way of doing it, since .NET 2.0) rather than using System.Diagnostics.Trace. I've tried everything but it just doesn't want to ...
I Use windows authentication with profile and wanted to flip to a custom authentication.
My question is How can I specify that my user is authenticated and how to set the Profile.UserName.
I Know the Profile.UserName is ReadOnly .
In my Web.Config, i change the authentication mode="None" and configure IIS to enabled Anonymous.
In the...
The web site I am developing will be sending tens of thousands of emails daily (and that number will be growing) - registration, notifications, alerts, etc. I will have a dedicated server box that will be actually generating and sending emails by request from the asp.net application (asp.net app calls a WCF method on the email box and pr...
In asp.net page, How can i call the javascript methods for form processing-submitting if the user browser supports javascript and use code behind events if the browser does not support javascript.I have the javascript code to send the form data to an ajax server page using jquery. Don't know how to invoke the needed one based on the brow...
In my master page I have:
MembershipUser thisUser = Membership.GetUser();
loggedInUserID = thisUser.ProviderUserKey.ToString();
thisUser gives me access to all the fields in aspnet_Membership.
I want a new field, isSubscribed for each user. I can use an SQL query to fetch the value fine, but I want to know if there is someway to mod...
Hi!! I have an .aspx page named PropertyListNew.aspx which it's url is rewriten like this:
<if url="/Propiedades/(.+)/([0-9]+)">
<rewrite to="/propertyListNew.aspx?currentPage=$2" />
</if>
the thing is: I have an asp:DropDownList inside my page (with current url "/Propiedades/(.+)") with autopostbak=true and when that dropdown...
I have a login page which has two options "login as guest" , "login". Each click event will take the user to the same page. However, if login as guest is clicked then i want to be able to change what info is displayed on the page the user is being redirected to. I do not want to use a session variable. Any thoughts on how to do this?...
Some background.
Currently have an asp.net web site which is contained on 2 web servers which are load balanced i.e. web farm.
I would like to have some code which would allow me to call a particular server and execute a method on it. I WANT TO do this so that i can force all web servers to refresh their cache via a web page on the sit...
I have the following textbox with validation:
<asp:TextBox ID="txtInput" runat="server" Width="80px"
CausesValidation="True"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredValidator" runat="server"
ControlToValidate="txtInput"
Display="None"
...
There is a debate going in our department to remove local admin rights to the development workstations we use. I believe this will cause problems for the developers when trying to debug or run other tasks in Visual Studio but I can't put my finger on any one thing to support my argument.
What features or tasks require Visual Studio to r...
Currently, we are doing error handling via Application_Error in global.asax.vb:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
OurLibrary.HandleError(Me)
End Sub
HandleError then logs the error into a database, displays an informative message to the user and returns the correct status code (404 or 500) dependi...
I have an existing project, and I want to intorduce Areas and keep my original code as it is.
i.e
/web/controllers
/web/views
..
/web/areas/new-area/
/web/areas/new-area/controllers
..
Do I have to modify routing for this to work? i.e. default area is ""?
...
I am using Datagride and I have a I have passed some parameters in it the code is as follow:
<asp:TemplateField HeaderText="Download">
<ItemTemplate>
<asp:LinkButton ID="lnkname" runat="server" Text="Download" PostBackUrl='<%#"~/logout.aspx?ID="+Eval("ID")+"&category=mobile"%>'></asp:LinkButton>
...
Context
I'm putting together a templated, databound control. Presently it works with the following syntax...
<cc:ItemChooserControl ID="ItemChooser" runat="server">
<TitleTemplate>
<h4><%# DataBinder.Eval(Container.DataItem, "DisplayName") %></h4>
</TitleTemplate>
</cc:ItemChooserControl>
Problem
What I would like t...
I have a search page that is tasked with searching 3.5 million records for individuals based on their name, customer ID, address, etc. The queries range from complex to simple.
Currently, this code relies on a SqlDataSource and a GridView. When a user types a serach term in and presses enter, the TextBoxChanged even runs a Search(ter...