How can I export a Gridview's data to Excel using C#?
How can I export a GridView's data to a Microsoft Excel 2007 file? Also, does Microsoft Excel 2007 support html elements and tags? ...
How can I export a GridView's data to a Microsoft Excel 2007 file? Also, does Microsoft Excel 2007 support html elements and tags? ...
Please tell me how can save a string with special characters to DB.Special characters may contatin single quotes/double quotes etc.. I am using ASP.NET with C# ...
I want to list some records from the table in a ASP.NET page. For each record, I want to display some data and at the same time, provide a button for them to click. I want to show a “CLICK TO VIEW BUTTON” If they click on the button, I want to have a box slide down (using jQuery) to display the other details for the record. An example o...
I am working on a project and trying to determine what platform to use. Right now, my first choice would be to use ASP.Net MVC with a MySql database. My concern with this is that the MySql drivers have a GPL license. I am creating this for a company and therefore it can't be an open-source project. Here are the questions I have: If I u...
In a html page we use the head tag to add reference to our external .js files .. we can also include script tags in the body .. But how do we include our external .js file in a web user control? After little googling I got this. It works but is this the only way? ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "MyUniquek...
I want to add an item to an ASP.Net combobox using Javascript. I can retrieve the ID (No Masterpage). How can I add values to the combobox from Javascript? My present code looks like this. //Fill the years (counting 100 from the first) function fillvarYear() { var dt = $('#txtBDate').val(); dt = dt.toString().sub...
Hi All, I have a ASP.NET 3.5 App and trying to update a Update Panel which has a nested custom control. In that custom control is a ComponentArt Gird, which gets filled by almost 13MB of Data (Yes, I could chunck that...) at this Update. I have a hidden button wihtin the update Panel, which I trigger by JS from client side, when I need...
Not exactly a question this, but something that might help out a few people I hope.. Some time ago, I wrote a general transparent exception handling module for use in a MOSS 2007 (Sharepoint) solution. The solution had many web parts, web parts that would often break, causing the entire page they were on to crash. This was causing our t...
We've got a fairly complex httphandler for handling images. Basically it streams any part of the image at any size that is requested. Some clients use this handler without any problems. But we've got one location that gives us problems, and now it also gives problems on my development environment. What happens is that the client never r...
Hi, I have a page on which I must load controls dynamically based on the user selection. Let's say that I have something like this: public static readonly Dictionary<string, string> DynamicControls = new Dictionary<string, string> { { "UserCtrl1", "~/Controls/UserCtrl1.ascx" }, { "UserCtrl2", "~/Control...
I am new to JQuery and am using the JQuery validation plugin. Great stuff! I want to migrate my existing ASP.NET solution to use JQuery instead of the ASP.NET validators. I am missing a replacement for the regular expression validator. I want to be able to do something like this: $("Textbox").rules("add", { regularExpression: "^[a-zA-Z...
How to Convert html web-page to image format in ASP.net web-application Regards, Prashant Trivedi. ...
(Warning - asp newbie) I have an aspx file with the tag <%@ Page Language=VB ... %> right at the beginning of the file. When calling this from my IIS server (http://localhost/myservice/default.aspx), this gives me the error This page contains the following errors: error on line 1 at column 2: StartTag: invalid el...
Under visual studio if you run a web project by pressing the 'Go' button on the Debugging toolbar, then stop it by pressing the 'Stop' button on the debugging toolbar, Internet Explorer is opened and closed by the IDE. Is there a way to prevent the IDE from closing Internet Explorer when stopping debugging? I want to do this to allow my...
Today I stumpled upon the shadowCopyBinAssemblies option in the hostingEnvironment tag. Appearently this attribute it is a web.config (system.web) configuration Boolean option indicating whether the assemblies of an application in the Bin directory are shadow copied to the application's ASP.NET Temporary Files directory. <hostingEnviro...
I am binding a Treeview to an XMLDataSource, The databindings are being generated automaticaly, The XML looks like this:- <Passengers> <Passenger> <PassengerName>Name1</PassengerName> </Passenger> <Passenger> <PassengerName>Name2</PassengerName> </Passenger> <Passenger> <PassengerName>Name3</PassengerName> </Pass...
As the title suggests, I am having trouble maintaining my code on postback. I have a bunch of jQuery code in the Head section and this works fine until a postback occurs after which it ceases to function! How can I fix this? Does the head not get read on postback, and is there a way in which I can force this to happen? JavaScript is:...
First of all, let's define a few tables: Users table will store information about a user: Users - UserID (int, PK) - ... UserTasks is a table that stores a task associated with a user: UserTasks - userID (int, FK to Users table) - taskName (varchar) When I generate the UserTasks table using the ADO Entity Framework, I'll get a c...
I want to make custom control which has couple of <input type='checkbox' /> controls which I render in Render method. Is it possible to retain ViewState (e.g. checked or not) on these Controls? There is a way of doing this by using ASP.NET server CheckBox control, adding them in OnLoad event with this.Controls.Add(), and giving them s...
Imagine the following scenario - we have Page1 which contains controls Control A and Control B. Say Control A has a button, and on the click of this button we want Control B to react. But we want to do this in an abstract fashion, i.e. we can't have Control B knowing anything about Control A, and vice versa. That way we can develop the...