I have a hidden field on my default.aspx page. Within default.aspx page I have a user control which has a label on it. I need the label to display the value on the hidden field. How can I go about this?
...
I have an ASP.NET website with two different sections, root website and an /Admin sub-folder. I want to have two different forms authentication/login pages for them. /Admin folder should use/redirect /Admin/Login.aspx and root pages should use /Login.aspx. What should I do in web.config to accomplish this?
...
Hello,
a customer asked me for a web app, written in ASPNET, that can use an editable grid (that works with a SqlServer DB) in the similar manner as Excel works; i can use gridView with Edit link in every row but i wanted to know if there are better solutions (possibly free..) that i can use.
Thanks in advance !
c.
...
Suggestion in either in C# or VB.NET is acceptable.
I have a class to handle file download link ASP.NET project like the following:
Public Class AIUFileHandler
Public Shared Sub DownloadFileHandler(ByVal fileName As String, ByVal filePath As String)
Dim r As HttpResponse
r.ContentType = "application/...
I am downloading a file from a remote location to my local machine. The paths I am using are saved in web.config and are in following format:
<add key="FileFolder" value="Files/"/>
<add key="LocalFileFolder" value="D:\REAL\" />
the code I am using to download is:
CreateDirectoryIfDoesNotExist();
WebClient webClient = new WebClien...
hello everybody,
in my web site i have two databases, ASPNETDB.MDF and a self created one (database.mdf). (The don't contain a lot of data yet)
But i need a relationship (foreign key) between a table in ASPNETDB.MDF and a table in database.mdf.
So i guess i need to merge both databases first, would you just extend the "ASPNETDB.MDF" wi...
Hi,
I am using AJAX extension in visual studio 2005.
First of all i am created a Web custom control which contains Dropdown list.
I have also set AutoPostBack="true" for getting its SelectionEventChange event.
I am added this web control on another page inside a UpdatePanel.(i added dynamically on another page).
MyControl = (MyControl...
I used this brilliant solution to convert a linq query to a datatable. But I'm getting a strange error when running it. Build succeeds though.
Compiler Error Message: CS0121: The call is ambiguous between the following methods or properties:
'Gruppkoll.App_Code.ConvertToDataTableFromLinqResult.ToADOTable<Gruppkoll.MessageSet
(System...
I'm trying to enable passthrough or impersonation authentication inside an ASP.NET website that uses the TFS2010 API.
I've got this working correctly with Cassini, however with IIS 7.5 (Windows 7) something is going wrong.
I found this blog post on the subject, and tried the following:
private static void Test()
{
TfsTeamProjectCo...
I'm not sure why this is, basically when I insert a row using the following function:
public bool CreateUser(string username, string password, string email, int age = 0)
{
SqlConnection myConnection = new SqlConnection();
myConnection.ConnectionString = "Data Source=localhost\\SQLEXPRESS;" +
"Initial Cata...
I have two silverlight apps on the same page that use the same methods from the same classes on page load. This causes problems in firefox (firefox doesn't respond and shuts down/crashes), but is okay in IE and chrome. Is there a reason for this?
...
I've been tasked with writing a SP (Service Provider) for SAML v2.0 in ASP.NET, and I wonder the following;
If a user logs in on the main SP for a service (where my SP becomes accessible for a user as an anchor/link, unless previously bookmarked), and then requests access to my SP, how should I handle their login?
They will have logge...
I am facing a problem.
I maintain a session after login like session["UserID"] and every page is locked with this session like
if(session["UserID"] == "")
{
Response.redirect("./loginpage.aspx");
}
else
{
// page working code
}
Problem is that i am saving the data then redirect the page after saving session was automatically clear ...
Hi,
I have an .aspx page. I populate a public variable in the code behind (.cs) page and then access that variable in JS on client side. I have the script declared after the FORM tag as below :-
<body>
<form>
...
</form>
<script language="javascript" type="text/javascript">
debugger;
var data = "<%=cSharpData%>";
...
I am to access a method on my master page. I have an error label which I want to update based on error messages I get from my site.
public string ErrorText
{
get { return this.infoLabel.Text; }
set { this.infoLabel.Text = value; }
}
How can I access this from my user control or classes that I set up?
...
I am developing asp.net with c#web application.
I want to have a control in ASP.net that has text formatting controls as well as a ruler to edit the text which i enter in text area. It would be great if i can open Msword in a web browser without Save buttons at the client side.The data must be saved into the database.
The control shoul...
I need to generate some kind of reports in excel via web system. My current code is as follow (simplified):
//[javascript inside .aspx page]
ExcelApp = new ActiveXObject("Excel.Application");
ExcelSheet = new ActiveXObject("Excel.Sheet");
ExcelSheet.Windows(1).WindowState = 2;
ExcelSheet.Application.Visible = false;
for (i=1; i< [ele...
I have a view page with model validations and client side validation enabled. I have a submit button which on click I have called a javascript function which uses jQuery for an AJAX call to the server..but I want to stop the AJAX action when client side validations fails. Any idea how to?
<% Html.EnableClientValidation(); %>
<% using (...
I want to get currently logged in active directory user name/details.
Here, User does log in to machine with its AD username and password. How can i get this user name and other details in Global.asax file for Application_AuthenticateRequest() Event.
I have used System.Security.Principal.WindowsIdentity.GetCurrent().Name
OR
HttpConte...
Hi All,
I want print PDF file from the client machine. The PDF file exists on the server.
Please help.
...