asp.net

Problem in event generation of dynamically generated CheckBox

Hi I have a datagrid with dynamically generated checkbox column..I am not able to generate the checkedChanged event for the checkbox.. Here is my code: public class ItemTemplate : ITemplate { //Instantiates the checkbox void ITemplate.InstantiateIn(Control container) { CheckBox box = new CheckBox(); ...

Diagnosing 404 errors on IIS 7 and ASP.NET MVC

I have an mvc app developed and tested with Cassini. Deployed to my site on GoDaddy, and the default page comes up fine. Click to log in, and I get a 404. I'm running under IIS 7 there, so this is unexpected. My routes are pretty plain: routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Def...

ReportViewer "Missing URL parameter: Name"

In a web application I'm working on the ReportViewer keeps giving me a error "Missing URL parameter: Name". I have found the cause but not a solution. The url that is causing the exception from the report viewer Reserved.ReportViewerWebControl.axd?ReportSession=3bkunv2wte3wmnabkquyr1y0&ControlID=1e2b5870e07b46abac7fd32a9e0e4b9d&Culture...

Printing receipt ASP.NET

Hi, I'm currently making a project where I need to print out a receipt on a receipt printer. At the moment i'm using the CSS mechanism media=screen , media=print to indicate what to print. Problem is of course the header and footer which can't be removed, as it is client browser specific. So i'm wondering if anyone has another suggest...

Why does ModalPopupExtender not show through javascript?

I followed several web resources to understand how to show a popup from client side, and I made this code: <asp:ImageButton runat="server" ID="btnOk" ImageUrl="imagens/btnAlterar.gif" OnClientClick="btnOkClick()" /> <asp:LinkButton runat="server" ID="dummyForPopup" Visible="false"/> <ajaxToolKit:ModalPopupExtender runat="server" Behav...

ASP.NET MenuItem Individual Styles

I'm hoping to use an ASP.NET Menu Control for navigation through my site. However, I've got a requirement that each MenuItem must be styled differently (different colors, both static, and onHover). Without creating a custom class that would inherit from MenuItem, is this possible? Thoughts on a better solution? ...

How to make a search engine for my apps

Duplicate of: What is a good search engine for embedding in a web site. I mainly build apps in asp.net using a ms sql backend. Does anyone have a dummy guide for making a good search engine? I've been told not to you like statements in my stored procedures. If I don't use like, how do I search for terms with in all my columns conta...

ASP.NET Best way to retain label.text value between postback with PageMethods

ASP.NET 2.0, PageMethods. Good day, I'm using ASP.NET AJAX PageMethods to dynamically change the text of a Label when a dropdownlist is changed on my page. I know that the text of Labels are not retained between postbacks when they are changed on client-side, which is my case. I've heard that a solution is to keep the label content in...

ASP.NET/IIS equivalent of Java/WAS context-root

In Java on WebSphere Application Server if I want my servlets, etc., to start with a certain root path, I use the context-root property in the EAR deployment descriptor (application.xml). For example, my servlet is named GetData, but I want the URL to be www.mysite.com/secure/restricted/GetData, so I set the context-root to secure/restri...

toggle div visibility with a checkbox list

Hi, I have a web application(ASP.NET2.0 C#). Within it, I have a div that contains a checkbox list and a button. I want to toggle the div viewing, so I got some javascript code online to help me. Heres the code: <script language="javascript"> var state = 'hidden'; function showhide(layer_ref) { if (state == 'visible') { ...

How do I find out which request path is missing in a 404 error handler in iis7?

I am trying to create a custom error handler in iis 7. web.config httpErrors section: <httpErrors> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" prefixLanguageFilePath="" path="/path/to/handlerwebservice" responseMode="ExecuteURL" /> </httpErrors> web.config httpHandler to handle error: <add path="*/...

Silverlight 2 - Download file - IE Blocks file download

Hi All, I'm having a problem with IE only in my Silverlight application. Since Silverlight 2 doesn't include a mechanism for file downloads I was left to my own devices to come up with a solution. The way I did it was as follows: HtmlPage.Window.Navigate(new Uri(sb.ToString(), UriKind.Relative)); My StringBuilder contains the relative ...

Including an asp vb page in an aspx c# page

Can I have an aspx page written with a C# code behind file. And include an asp page with code written in vb? ...

Onleftclick & onrightClick javascript functions????

In my server side code I am dynamically building a table and and right now I am adding the following code to handle the row click. tr.Attributes.Add("onclick", "window.open('" + root + document.IPT_Name + "/" + document.IPT_Sub_Name + "/" + document.File_Name + "', 'mywindow', 'toolbar=no,location=no,directories=no,status=no,menubar=yes...

Writing to a text box from an update panel

I am trying to access the Text property of a textbox from a partial postback-done in an Update Panel. The problem is that this textbox I want to access is not in this Update Panel, and when I am trying to write to it (putting content in the Text property), this new content is not being displayed. I think that this is because this textb...

Session.Start called on every request when fired

I've got a "works on my machine" situation. I have a website where I'm passing session values from one page to another using Session["foo"] = 'blah'; and on page2 var foo = Session["foo"]; foo doesn't exist on page2. When tracing the page I've found it was using a different sessionid to the original page. When putting a breakp...

How to get date part from datetime?

Duplicate: How to truncate a date in .net? I have datetime field containing '4/1/2009 8:00:00AM'. I want to get '4/1/2009' without the time. ...

ASP.NET Event Handler for label in Datalist

Hey guys, I'm working on an ASP.NET page, and have a DataList with a non-visible label, ID, inside of it. The Datalist is populated by Query A. I'm trying to add a handler in my VB code where it will run Query B, populating a different label in the Item Template, after ID is changed. I figure I need to go somewhere in the DataList, but...

Login Control - Response.Redirect

I have a usercontrol on a page that has a login control in it. This controls the display of another user control (if the user is not logged in they get the login control user control). I have some authentication code (see below) that runs when the user clicks the "Login" button. Basically I want it to post back to the same page so the...

Active/Crystal Reports & The End-User Designers

I've been doing research on reporting suites for a project my company is about to undertake, and have narrowed the candidates down to Active Reports and Crystal Reports. During the demo yesterday, it was clarified to me that one of the capabilities our client would like is the ability for the end-user to create custom reports integrat...