asp.net-3.5

CSS and Images broken in login page using a Masterpage, work when auth=windows

I have a login page that inherits a masterpage that has my navigation controls. I enabled forms authentication and when I run my code and the login page appears all the images and css values are not working. If I stop the application and go to design view everything is there like it should be, if I turn off forms auth and set it back to ...

ASP.NET WebService is Wrapping my JSON reponse with XML tags.

I'm not sure where I'm going wrong of what I'm missing. I'm building an ASP.NET 2.0 (on the .Net 3.5 framework) Web application and I am including a webservice. Note that this is not an MVC project. I wish to expose a method which will return a JSON string; formatted to feed the jqGrid jQuery plugin. This is the preliminary test metho...

Dynamic value in dropdownlist onchange call

In the following code snippet I'm trying to set the setPrice argument dynamically. XHTML: <asp:DropDownList ID="CCType" runat="server" onchange="setPrice('<%# Eval("setPriceVal") %>')" TabIndex="16"> </asp:DropDownList> Code Behind: Dim setPriceVal As Literal = CType(FindContr...

how to assign target control to validator control on serverside

Hi I am having N numbers of Text boxes those are generating dynamically. I want to validate each textbox for Formate HH:MM:SS PM/AM so i dynamicaly create the validation control . but as the dynamic textbox has no ID , so what i have to pass to the Validation control for ControlToValidate Property ? ...

ASP.NET Routing (3.5) - How to handle multiple TLD domains?

Is it possible to have one asp.net web application that handles requests from two domains via asp.net routing? I need one TLD domain per language version pointing to the same app. How to set up a route that recognize, if the request is coming from domain1.de or domain2.com? How to configure the domains DNS for this to work? Thanks i...

Regular expression to strip everything between anchor tags

Hi , I am trying to strip out all the links and text between anchors tags from a html string as below: string LINK_TAG_PATTERN = "/<a\b[^>]*>(.*?)<\\/a>"; htmltext = Regex.Replace(htmltext, LINK_TAG_PATTERN, string.Empty); This is not working anyone have ideas why? Thanks a lot, Edit: the regex was from this link http://stackove...

ASP.NET: Code behind or no code behind?

Why would anyone want to not use a code behind file so that server sided code is separated from markup? Wasn't that supposed to be one of the advantages of .NET over classic ASP? Personally, I think mixing code with markup makes the code a lot harder to understand. I hate to see those darn <% %> (server sided blocks) inter-spliced in ...

How to Search a Database Table using One of Two Fields from ASP:TextBox and LINQ to Entities

Hello, My goal is to place a search box on partsearch.aspx page The search box will contain a textbox and a dropdownlist. The dropdownlist has two items, PartName or NSN, which need to be used in the where clause of my database query. If PartName is the selected value, then the query needs to be based on that field. If NSN is the se...

Windows Workflow Foundation in ASP.NET 3.5 Web Application - Best Approach

Hi, What is the best way to use Windows Workflow Foundation in ASP.NET 3.5 Web Application. In my case there are several workflows(sequential) which includes numerous steps, user has the privilege to save and exit at any of these steps; the state must be persisted, possibly in SQL Server. Exposing workflows as web service is good i...

How do you disable adding the same webpart multiple times from an asp:catalogzone?

If have a standard aspx page (non-sharepoint) that hosts webparts It contains one asp:catalogzone and four asp:WebPartZone's. I have a business requirement that my new webpart must start in the catalog and a user can choose whether to add it to a zone to display it, (not displayed by default). Easy so I add it to the catalog zone inst...

How to add multiple TIFF files to ASP.NET output stream

I have a requirement for displaying one or more TIFF files on the same ASPX page. To add to the complexity, some of the files can be multiple page TIFF files. IE6-8, FF 3.X, Google Chrome support required. I have had some success displaying any one image by converting the file to a MemoryStream and sending to to the Response via Binar...

ASP .NET app Crystal View Export/Print Buttons NOT working

I created a ASP VB .NET application using the Crystal Report viewer. When the app runs the reports display correctly in the viewer but when I click on either the Export or Print buttons I get an error, an icon of a Yellow Starburst with a Red Exclaimation point appears and I hear a clicking sound. The show tree button works and the refre...

how to authenticate user of ASP.NET web service which is part of ASP.NET web application?

I have a C# ASP.NET 3.5 web application which uses forms authentication. Users log in with their username and password on login.aspx, are authenicated using a custom authentication logic and are then directed to input.aspx, where they enter some parameters and get response on output.aspx. If they try to access input.aspx without authenti...

mvc - show/hide stuff based on what view it is for a user control

Hi, Im using asp.net mvc. I have a create and edit form which are very similar so im using a user control for the form. and placing that in each view. the form is very slightly different on the edit form eg it has some extra text and a link. how can i show/hide that based on the view im in? ...

Recaptcha ErrorMessage Property Not Working

I am using recaptcha in an ASP.NET 3.5 application and for some odd reason the ErrorMessage property is not working. Below is my code <recaptcha:RecaptchaControl ID="recaptcha" runat="server" PublicKey="*******************************" PrivateKey="*******************" Theme="white" ErrorMessage="This is an typo error" /> When the ty...

ASP.Net 3.5: Specifying a control's HTML ID

I have a control which is repeated several times in a page. I'd like each occurrence to have a unique ID which I will define (not the horrible ID asp.net attaches). The problem is that I will only know the ID in run time. I'd like in the .aspx to write the following: <uc8:MyControl ID="<%=THEID%>" runat="server" /> but I know it does...

How can I apply Work Flow to ASP.NET? What existing problems with ASP.NET would a Work Flow oriented approach solve?

In simple terms: Why use Work Flow? Just for the somewhat graphical interface? Note: I don't plan to use MVC so applications implementing MVC with Work Flows are not what I'm looking for. ...

Updateable Google Sitemap for ASP.NET 3.5 Web App Project

I am working on an ASP.NET 3.5 Web Application project in C#. I have manually added a Google-friendly sitemap which includes entries for every page in the project - this is not a CMS. <url> <loc>http://www.mysite.com/events.aspx&lt;/loc&gt; <lastmod>2009-11-17T20:45:46Z</lastmod> <changefreq>daily</changefreq> <priorit...

Programmatically Update Date Stamp of ASPX file

When adding new DB records to a ListView, I want to update the date/time stamp of the containing ASPX page for SEO purposes. Is this possible and how might I go about it? UPDATE: I found Touch for Windows, bu would still prefer any kind of clever hack just to do this programmatically: http://www.softpedia.com/get/System/File-Managemen...

Swf File..Need to change on page load

how to change the url of swf file on page load...like we do in adrotater? its urgent plz help me out.... ...