asp.net

One user control updating another during AJAX Postback?

I developed a user control that displays a list of products and it works pretty good. Then I dropped this user control into another user control that allows the user to pick different criteria and the product UC updates to show those products, all pretty slick and with AJAX via UpdatePanel. All was working just fine... then another req...

Accessing information in the AssemblyInfo.cs using Reflection in a Web Site

I have created a DLL that will gather information from the AssemblyInfo.cs. In the class constructor I am using Reflection to get the top-most application that is running. public class AppInfo() { public AppInfo() { System.Reflection.Assembly assembly = System.Reflection.Assembly.GetEntryAssembly(); ...

C# code to linkify urls in a string

Hello, Does anyone have any good c# code that will parse a string and "linkify" any urls that may be in the string? ...

Asp.Net 2.0 and Asp.Net 3.5 code compilation models – are there any differences?

I've just started to learn about Asp.Net 3.5 compilation model, but most articles mostly talk about Asp.Net 2.0 compilation model and how it differs from previous versions of ASP.NET compilation model. So I wasn't able to find any article explaining if there are any differences between ASP.NET 2.0 and ASP.NET 3.5 compilation models. Thus...

ASP.NET + Empty Response from WebServices / HttpHandlers

A few weeks ago, I posted a question saying that Update Panels had empty responses. I was unable to resolve it. However, today I noticed that webservices, and HttpHandlers also return nothing, IE this: public class Handler1 : IHttpHandler { public void ProcessRequest(HttpContext context) { context.Response.ContentType ...

Use of Container.DataItem in an ItemTemplate

I'm not able to get this working and I can't figure out why. <ItemTemplate> <% if (Field(((DataRowView)(Container.DataItem)), "Video File") != "") { %> <a href='upload/images/<%# Field(((DataRowView)(Container.DataItem)), "Video File")%>'>Download Link</a> <% } else { %> <embed height="14" width="661" name="plugin" src="<%# Content...

Mailing Address Verification, Etc. Get County from Zip

It seems fairly common today for websites to perform some address verification behind the scenes. For example, the 4 digit extension on zip codes is commonly filled in. In addition to filling in the 4 digit zip code extension, I would like to know what county the address belongs to. This will be utilized in an ASP.NET 3.5 application ...

Extract embedded resource without WebResource.axd

Are there any ways to programmatically extract an embedded resource instead of going through the WebResource.axd handler? I have the two parameters (d & t) that are passed to the WebResource.axd handler. I'm hoping there's a way I can use those parameters to extract the resource myself. Any tips are appreciated, thanks. ...

UpdatePanel in repeater overwrites controls underneath it

I have a Repeater with an ASP.NET AJAX 1.0 UpdatePanel inside it. There are buttons outside of the UpdatePanel but still in the repeater. When a section inside the UpdatePanel appears (it's a hidden Panel control that appears when user answers a question a certain way), the buttons at the bottom disappear. Here is an illustration. [RE...

how to create Silverlight application in ASP.net 2.0

I need to create a web application with silverlight controls how to create this in ASP.net 2.0 with VS 2005. Help me out ...

How do I force a process to break when debugging if I don't know where to place the breakpoint?

How do I force an asp.net app to break in VS 2008 when I don't know what code the process is hitting? I am getting a problem where there seems to be something looping in the code and after putting in a bazillion breakpoints in can't find it. I want to force the app to break so that I can see where the problem lies. ...

dynamic file upload in c#

Hey I have absolutely no idea on how to upload multiple files in asp.net using c#,with single upload button.Its not known in advance ,how many files are there. Can somebody provide me the code in c#??I would be grateful. Thanks in advance!! ...

How do you write a unit test to test an ASP.NET web forms application for CSRF vulnerability?

We have an ASP.NET web forms application that is probably vulnerable to Cross-site request forgery (CSRF) attack. How do we begin to write a unit test that will alert us to this? Using NUnit. Some tips or pointers would be great. ...

asp.net gridview control does not show paging numbers.

Hi, My asp.net site has master page. On one of the pages that use master page, I have 2 grid view controls. Both are tied to their own datasourcecontrols. I tried to enable paging on the grid but paging does not show up. please help. ...

Dynamic textbox text - asp.net

Hi! I'm trying to separate my presentation and logic as much as I can, but there's one problem. How can i set the text-property to a dynamic value from my design file? I want to do like this: <asp:Textbox id="txtUrl" runat="server" Text="<%= user.URL %>" /> But this will fail. Am i forced to do this from code behind? ...

Best way of dynamically setting color of control at runtime

I currently load controls at run time, and want to set the color, but not a named color. I was thinking I need to create a color object , set the color of this then assign it, any direction? Thanks ...

Getting a substring of text containing HTML tags

Getting a substring of text containing HTML tags Assume that you want the first 10 characters of the following: "<p>this is paragraph 1</p>this is paragraph 2</p>" The output would be: "<p>this is" The returned text contains an unclosed P tag. If this is rendered to a page, subsequent content will be affected by the open P tag. Ide...

Pagewise text rendering in web application using asp.net and C#

HI, I have a large html formatted text. I want to display the text in pages ( as in MS Word ). Is there any way to do this? ...

Currency format string in asp.net

Hi, I am using an infragistics webgrid and need to format a currency string. For this I need a string containing a pattern such as "$ ### ###,00" and I would like this to come out of my current CultureInfo. How can I do this? Do I need to compose it manually from the info in: CultureInfo.CreateSpecificCulture(myLanguageId).NumberFormat...

asp.net server.execute

hi I am using server.execute to call a another form my code Looks like this <div> <% server.execute("default2.aspx") %> </div> My problem is the size of the default2.aspx is greater so when i apply height to the div the default2.aspx is overlapping the other content in the default page ...