Why do ASP.NET LinkButton controls with OnClientClick attribute and disabled by setting Enabled="false" still render onclick event handler in HTML while Button controls don't?
It seems counter-intuitive. Since anchors can't really be disabled in browsers, it makes more sense not to attach an onclick event (and href attribute) if it has ...
Hi all!
Is there any solution for accessing TempData property in the HttpResponseBase.WriteSubstitution() method
This does not work:
<%= Response.WriteSubstitution(x => Html.Encode(TempData["message"].ToString())) %>
But this works:
<%= Response.WriteSubstitution(x => DateTime.Now.ToString()) %>
The problem is in request processi...
I have an asp button. It's server-side so I can only show it for logged in users, but i want it to run a javascript function and it seems when it's runat="server" it always calls the postback event.
I also have a regular button (<input...>) not running at server and it works fine...
How can I make this button only run the javascript a...
This is a difficult question to ask because it's so wide ranging.
Does anybody know of a scoring system of questions that would aid in choosing between a WebForms and MVC application at the start of a project?
e.g. Is TDD an important part of this project? (If yes score 1 for MVC and 0 for WebForms)
...
I'm trying to grab the Web.UI.WebControls.HyperLink object itself via javascript so that I can modify its ImageUrl.
Here I'm setting the hyperlink's NavigateUrl to the my javascript function call:
lnkShowHide.NavigateUrl = String.Format(
"javascript:ShowHideElement('{0}');", lnkShowHide.ClientID
)
Here's my javascript function:
...
I want to make a screen scraping exactly the same idea as this one http://www.vimeo.com/1626505 What i want know is how to do so?
- When the user click on the bookmarklet, it will send to my server the URL then my server will get back to the client page with the scrapping javascript files which will load with the iframe load, the java sc...
Hello,
If we want to convert a Page to user control then we should also do the following:
“If you aren’t using the code-behind model, make sure you still include a class name in the Control directive by supplying the ClassName attribute. This way, the web page that consumes the control can be strongly typed, which allows it to access p...
I've got a master page in a root folder of an asp.net application and content pages in subfolders. I'm using forms authentication and am not sure what to do, in web.config, for the master page. Does the forms authentication protect the child pages or the master page?
How does it work?
...
I use MySQL in my ASP.NET app (with the MySQL .NET Connector), is there anyway to programmatically check whether the db server is down? I came across MySQLConnection.Ping() but unfortunately that doesn't work the way it should (the connection has to be opened first using Open(), also it keeps on returning false even if the DB Server beco...
I am planning to create a component that will be able to check user's credentials (username and password) and, if they are valid, return associated profiles.
I don't want to use the providers that already exist in the .Net framework (I am trying to exercise my development skills ).
Is there any pattern I can use? Or standards?
...
I'm just getting into Markdown and think it's the bee's knees. I'm working in ASP.NET (MVC) and am wondering if there are any good .NET libraries for Markdown, and am also curious how SO renders it on the fly. It must be a JavaScript library.
...
I have a web app that is being hit by facebook. The login page retrieves the keys that I need and sets some session variables. When the server then redirects the user to the next page, the session information is lost. I’m running the IIS engine on vista ultimate at the moment, the app pools don’t matter because I’m using a state servi...
I have in a page a databound checklistbox which is populated with data on OnLoad page's event, and also a button.
If the user clicks the button, I must recolect the checkboxes selected inside the checklistbox and do some processing.
But when I iterate over the checklistbox items collection all items have their Selected property set to...
Hi,
I want to get machine id of client computer. Client will log in to my application with his/her login ID.
Now I want to keep track of which userID(login id) is used with which MAC address.
...
I am having issues with getting a silverlight control to appear on a page in such a way that it is as wide as the browser but as long as it needs to be.
I can't seem to nail down the CSS that enables this. The closest I have gotten is to make the Silverlight control as tall as the browser but no taller. Below is my aspx file:
<%@ Page...
Hi,
I keep getting this error on asp.net page button click...how do i resolve this?
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters...
Hi, i've been making an asp website in which i'm providing the user a facility to upload videos and view them once they are uploaded. I've been successfully been able to upload videos to my server, but not getting as how to play it on the client's page. I want to buffer the video and stream it on user's browser, don't want him to wait an...
I have a portion of code like this:
Process proc = null;
try
{
proc = new Process();
string dir = HttpContext.Current.Server.MapPath("~/Other/");
proc.StartInfo.WorkingDirectory = dir;
p.StartInfo.FileName = "batch.bat";
p.StartInfo.CreateNoWindow = true;
p.Start();
p.WaitForExit();
}
catch (Exception e) { }
...
Hi all,
I am facing problem when i am creating new user,using CreateUserWizard control.I have added in connection string :
<connectionStrings>
<add name="BankingTransaction"
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Bank.mdf;integrated security=True;User Instance=True"
providerName="Sys...
I am using ELMAH to email error messages. Is there an elegant solution to query a database for SMTP settings rather than use web.config? I would need it to be done before each error is thrown.
The solution/s suggested here are a bit hacky for me.
...