Will the WebMatrix SqlDataSourceControl work with a MySQL connection
SqlDataSourceControl lets you connect and work with MS SQL DB, while AccessDataSourceControl do the same thing but for MS Access DB. Therefore SqlDataSourceControl can’t help you in your MySql connectivity . For Connectivity with MySql refer Accessing MySQL Database with ASP.NET
What is the difference between src and Code-Behind
Src attribute means you deploy the source code files and everything is compiled JIT (just-in-time) as needed. Many people prefer this since they don’t have to manually worry about compiling and messing with dlls — it just works. Of course, the source is now on the server, for anyone with access to the server — but not just anyone on the web. CodeBehind attribute doesn’t really ‘do’ anything, its just a helper for VS.NET to associate the code file with the aspx file. This is necessary since VS.NET automates the pre-compiling that is harder by hand, and therefore the Src attribute is also gone. Now there is only a dll to deploy, no source, so it is certainly better protected, although its always decompilable even then.
How can I change the action of a form through code
You can’t change it. The action attribute is owned by ASP.NET. Handle Events and Transfer. For work around refer to Paul Wilson’s Multiple Forms and Non-PostBack Forms – Solution
How to catch the 404 error in my web application and provide more useful information?
In the global.asax Application_error Event write the following code VB.NET Dim ex As Exception = Server.GetLastError().GetBaseException() If TypeOf ex Is System.IO.FileNotFoundException Then ’your code ’Response.Redirect(‘err404.aspx’) Else ’your code End If C# Exception ex = Server.GetLastError().GetBaseException(); if (ex.GetType() == typeof(System.IO.FileNotFoundException)) { //your code Response.Redirect (‘err404.aspx’); } else { //your code }
How to access the Parameters passed in via the URL
Call the Request.QueryStringmethod passing in the key. The method will return the parameter value associated with that key. VB.NET Request.QueryString(‘id’) C# Request.QueryString[‘id’];