webforms

ASP.NET - Display Images and pdf in a GridView

I want to display in an asp:GridView an "Images" column. The idea is to provide a thumbnails of the image with link to real size image. For some rows, this may alternatively be a PDF document. I'd like the link to be to the PDF. The PDF or image are stored in a SQL database. Now I have error in Handler (.ashx) file: "Invalid attemp...

tabular data in asp.net webform

I have an arraylist which I'd like to display in a tabular fashion, but instead of one item per row, I'd like to do it like this: item1 | item 2 | item 3 | item 4| item 5 | etc. Is there a control for this to which I can easily bind my data, or will I need to build the HTML out dynamically like I would have done in classic asp? ...

Expose a web service (wsdl) as a webform

Hello all, Just wanted to ask if anyone knows of a reliable & easy way to expose a webservice (wsdl) as a webform to end-users. Our team develops a lot of software for external contacts, which often involve creating a web service and exposing it as both a wsdl and a website. We'd like to automate this last step as much as possible (esp...

How to elegantly handle ReturnUrl when using UrlRewrite in ASP.NET 2.0 WebForms

I have a folder with multiple .aspx pages that I want to restrict access to. I have added web.config to that folder with <deny users="?"/>. The problem is that ReturnUrl is auto-generated with physical path to the .aspx file while I'm using UrlRewrite. Is there a way to manipulate ReturnUrl without doing manual authentication check a...

ASP.NET control property with [Flags] enum

I have developed an ASP.NET control for which one of the properties is a [Flags] enum. However, I don't seem to be able to specify multiple flags for this property in the ASP.NET control markup. Is there a special syntax to do this or is it just not possible? ...

Display error when entire form is blank in CodeIgniter

I'm trying to create a fairly simple form that has a few checkboxes and input fields and a textarea. Nothing is required by itself; however, if 'A' checkbox is checked, then 'A' input field is required (and so on for the couple other checkboxes I have). I have the above functionality in place, but I'm having a tough time figuring out h...

asp.net-mvc and webforms co-existing

We have a massive client facing web application here. We recently re-wrote the buy online experiance to make it quicker. My suggestion of using ASP.Net-MVC was not taken on board as I'm kinda the only one here that knows about it. Now we are about to embark on redeveloping another section of the site and again I can't use MVC because ...

ASP.NET security issues, maybe Umbraco related, but most likely just general security issue...

Hi folks, I have an incredibly frustrating problem cleaning up my site at the moment. On the same hosting space I have Umbraco (ASP.NET) and Blab Lite (PHP Chatroom) installed. The former talks to SQL 2005, and the latter to MySQL 5. On my Umbraco site I had a guestbook with an entry form. Upon postback it does an Akismet check and ski...

Tidy.NET for rendering ASP.NET pages (webforms)

I´m using tidy.NET for correcting (indenting) ASP.NET pages, but it creates 2 html tags, one with viewstate and other with rest of page. Could i change this for having only 1 html tag? Thx in advance, ...

how to write text and an image to a Response.OutputStream in ASP.NET

I'm drawing an image and outputing it to web page using the following code: Bitmap image = new Bitmap(350, 350); Graphics g = Graphics.FromImage(image); // code using g to draw image here image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif); This works fine. Now I'd like to add a some text to the output (javascrip...

How can I change child controls in a composite server control on postback

I have an ASP.NET web form composite control, let's call it control A, which contains a child composite control, which I'll call control B. The child controls of control B are dependent on a property of control A. On initial load I am setting this parameter in OnLoad of control A and everything works fine with the control B setting up i...

Why clear controls in CreateChildControls

All of the examples of ASP.NET composite controls always clear child controls as the first action within CreateChildControls. Why is this? As I understand it this method is always called via EnsureChildControls which sets a flag to indicate that it has already been called and thus does not call CreateChildControls again. Is CreateChildC...

Making CAPTCHA accessible to people with disabilities. What approaches have you used?

Hi Guys I'm nearing the completion of migrating our existing website to a CMS and I've just finished creating all the various contact forms. The CMS I'm using has CAPTCHA built into it's form builder, which is great, but the only method available is the "decipher-the-noisy-image" method. This approach works well, but it limits access f...

Binding a DropDownList in an editable GridView

I thought I'd save myself some time by throwing down a GridView in an admin tool I was working on. This particular page is for editing Categories that “widgets” can then be assigned to. For organizational purposes, categories can (optionally) also be grouped (assigned to a CategoryGroup). There were already existing business logic and ob...

Possible to set TextBox text declaratively?

I am trying to set a TextBox control's Text property to the value of a variable declaratively. The only way I have found that will set the text property is if I place it in the code-behind page, which is what I'm trying to avoid. I have tried to do all of the following, but with no success: <asp:TextBox ID="myTxt" runat="server" Text='...

How Do I Loop Through An Excel Spreadsheet With VBA, Paste A Value To A Website Form Then Extract The Result Back?

I am trying to loop through a list of names in an Excel spreadsheet using VBA and I would like to paste a surname into a text box on a webpage and then extract the returned phone number into a cell after the page has been submitted. I can only do this one name at a time so I would like to automate this process as there are several hundr...

jQuery .val() not updating on submit.

I have the following values from a form being accessed by jQuery using .val(): var un0 = $("input.e0").val(); var un1 = $("input.e1").val(); var un2 = $("input.e2").val(); var un3 = $("textarea.e3").val(); The original values in those from elements have been added earlier on by a different script that loops the values from AJAX XML da...

ASP.NET Response Content

I have tested this in IIS 6.1, IE 7, ASP.NET 3.5 SP1. I have a file download in a method in my aspx codebehind: Response.ContentType = contentType; Response.AppendHeader("Content-Disposition", contentDisposition); Response.BinaryWrite(file); This works great, but if I attempt to modify any of my sever side controls the changes do n...

How to show the content of the form just entered in the ":confirm =>" option on Ruby on Rails

I am trying to have a way of confirming the information entered before actually saving it to the DB Considered making an individual confirmation page as discussed here http://stackoverflow.com/questions/445293/ruby-on-rails-confirmation-page-for-activerecord-object-creation However my form includes an attached file using paperclip wh...

sparkviewengine alternative for WebForms project

I like the html dominated structure of the sparkviewengine very much. Is there a version of it for WebForms projects? I want to use it for generating presentation only html (I mean, the output will not contain any html input controls). Or can you recommend an alternative? VS.Net 2010 Framework 4.0 thanks for your time ...