webforms

Running Windows Forms Through In the Browser

I wrote a client/server program using windows form application in visual studio. Now i want to put this program onto a web page, so on the client side they can just go onto any browser and and access the server. Can i just embed the program i already hav onto a webpage or do i need to rewrite it using visual studio web application or...

ASP.NET: Suddenly the name 'form1' does not exist in the current context?

This has been working for the past three weeks that I've been developing this application, and for some reason has decided to stop working five minutes ago despite my apparently not doing anything. In Default.aspx: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AppName.Default" %> <!DOCTYPE html P...

How Do You Set Value of Input Element Programmatically Through CSharp?

Hello I am trying to automate my IE to log into a website but the problem is that the input elements do not have an HTML ID attribute! For example: <input type="text" name="user" size="15" value=""> How do you program C# to insert text in this text box? Thanks ...

Copy and Paste from an Excel Spreadsheet to a ASP.NET Control

I would like to be able to copy one row and five columns from an Excel spreadsheet to a table like structure on a ASP.NET web form. The idea is keeping the data in the exact row and column from Excel to the table like control on the ASP.NET web-form. Then I want to be able to save to the contents of the ASP.NET control to a database b...

Model View Controller

Hi All, Can someone help me understanding Model-View-Controller method to be implemented on WebForms? I am confused on couple of things: If we have ABC.ASPX and ABC.CS files, what is view? is it only ABC.ASPX file? or combination of .ASPX + .CS file? do we consider ABC.CS file as controller? If no, will it be a seperate class for cont...

jQuery Dialog, UpdatePanel, RegisterStartupScript, with Show: 'blind' bug?

Using ASP.NET Web Forms with an UpdatePanel, and using jQueryUI dialogs with a <asp:Button> inside. First, my code looked like this simple dialog demo with a show: 'blind' effect, but I had the issue that jQuery moves the dialog outside the form, preventing the ASPNET controls from posting back to the server. So, I used this excellent b...

How to add attribute to Title tag

I'm using webforms ASP.NET, with masterpages. I want to add a LANG attribute to the <title> tag. ASP.NET automatically generates a title tag. I've tried adding my own tag with an ID and runat="server", like this: <title id="titleBlock" runat="server"></title> When doing this, I can set an attribute like the following without any e...

generic database structure help with ASP web forms (microsoft visual web dev)

im trying to create a generic gallery application that uses a database, with the abilitiy to upload images from the website, using microsoft's visual web developer. -- im fairly new with databases and asp.net but am getting the hang of it i think >< most of the examples i see are one mdf file with several tables. but i want something th...

How to get an UpdatePanel inside fancybox working

Hi, I'm using fancybox to display the contents of a div when clicking a link. This works using the code below: <a id="popupTrigger" href="#popup">popup trigger</a> <div style="display:none"> <div id="popup"> <asp:UpdatePanel ID="HerkomstCodeUpdatePanel" runat="server" UpdateMode="Conditional"> <ContentTemplate>...

Error on "ambigous reference" points to same method twice

I used this brilliant solution to convert a linq query to a datatable. But I'm getting a strange error when running it. Build succeeds though. Compiler Error Message: CS0121: The call is ambiguous between the following methods or properties: 'Gruppkoll.App_Code.ConvertToDataTableFromLinqResult.ToADOTable<Gruppkoll.MessageSet (System...

Running a PIL based Python program as a web application

I have created a Python Program that converts strings into images at run time , using PIL's Image Draw module. I want to run this program interfaced with a simple web form that should display a text field to input the string and on pressing a button , it should display the string converted as an image. Would be a great deal of help if...

How to Html.Encode in webforms

Hi, I have a webforms applications. There is a page with textboxes and users enters search terms into these which are used to query the database. I understand I need to prevent javascript injection attacks? How do I do this? In MVC I would use Html.Encode. It doesn't seem to be recognising it here. Thanks! ...

Filling JQGrid Searchoption values dynamically

In my colModel I have defined that one of my columns will have a drop down filter in the filter toolbar. I use ASP.NET Webforms and a webservice webmethod I have tried to use dataUrl for this and it works with a static HTML page. However I need to use a call to my webservice, which I can't get working. searchoptions: { dataUrl: 'WebSe...

Asp.Net 4 webforms clientid suffixed with `_0`

Last year we moved all our new functionality to Asp.Net MVC. However we still have a load of legacy WebForms pages with lots of Javascript, and we're not going to get the chance to upgrade them any time soon. More recently we also moved to Asp.Net 4, and that seems to have broken a load of the Javascript on these legacy pages. Where b...

Visual Studio 2010 ASP.NET 4.0 WebForms Routing Not Working in IDE Debug Mode

Greetings, I am using Visual Studio 2010 and ASP.NET 4.0 to build a WebForms project that uses the new routing features in System.Web.Routing. When I build my solution and run it from within VS.NET's debugging environment only routes with RouteUrl's that include a ".aspx" extension are being properly routed to the PhysicalFile. It app...

How to protect the connectionstring in web.config?

Hi, I have a website about to go live. I'm wondering what I should be doing about the connectionstring in the web.config. Do I obfuscate it and it so how? Thanks! ...

How to Stop Wasting Time in PHP

As a programmer, I love developing algorithms. I love to take a problem and work out a clean, efficient, readable, elegant solution. I seem to find, however, that the majority of my time is spent validating and cleaning form data, and passing it along to prepare various SQL statements. Perhaps this is "just the way it is" but I suspec...

Creating default templates on Repeater that are overridable by users

I have a webforms control, my:Repeater, that is an asp:Repeater. I want to make a default template, like: <my:Repeater> <HeaderTemplate> My Default Header </HeaderTemplate> <ItemTemplate> My data </ItemTemplate> <FooterTemplate> My Default Footer </FooterTemplate> </my:Repeater> I want this template to be in so...

HTML input type submit value without modifiying post value?

Lets say I have a really simple html form: <form action="./whatever.php" method="POST"> <input type="submit" name="TheButton" value="Apples"> </form> Which of course makes the button the user sees say Apples. I want the post request to be TheButton=Oranges ... Is there a simple way to deal with this in HTML, or will I be need to d...

ASP.net webforms parameters in url

I have an asp.net page that contain a form that search the page. Is there any solution so that I can have the search text in the url? I want to give the posibility to my clients to copy/paste the search results url. ...