Все вопросы: [webforms]

493 вопросов

0
голосов
5ответов
679 просмотров

Referring to ASP.NET controls from Business Logic

In my page I have a textbox txtMyInfo. I also have a separate business logic class that I use to manipluate stuff on the page. How do I refer to txtMyInfo from a method in the business logic class. Can I reference the control via the page object? I don't see a reference. public void MyBusine...

4
голосов
2ответов
11440 просмотров

Reference Required for Assembly that is definitely part of a project

I have a project that I am in the process of migrating to using Linq To SQL. On the whole it's fine, but I'm stuck on an issue where if I try to put a timestamp from an DTO into a hidden field I get this error at runtime: BC30652: Reference required to assembly 'System.Data.Linq, Version=3.5....

0
голосов
1ответов
221 просмотров

How should I work with SQL Timestamps in a WebForms / Linq To SQL project?

I have a WebForms project where we are using Linq to SQL (L2S) to provide data access. I know L2S can handle timestamps, but what I'm wondering is, what is the best way to handle timestamps at the client side. I'm thinking that one possibility is to simply put the timestamp into a hidden field w...

3
голосов
6ответов
2269 просмотров

What is the best way to layout/design a long complex web form to collect user input

I need to design a web form which landlords can use to add rental listings. There are 8 mandatory text boxes and 2 optional text boxes, 11 drop-down lists, 12 checkboxes and one large text area. Any suggestions about how to arrange them in a way that is clean, and uncluttered? My concern is, if t...

2
голосов
1ответов
3112 просмотров

jQuery Postback with Webforms

We're redevloping a major section of our website and rather than use a 90k AJAX file I'd rather use a 19K jquery script. I've seen the following articles; Using jQuery for AJAX with ASP.NET Webforms jQuery autocomplete in ASP.NET webforms? Autocomplete with ASP.Net MVC and JQuery The thing ...

1
голосов
3ответов
1062 просмотров

ASP.Net (Web-forms) Page Lifecycle Problem - distinguishing between form loading, datapaging and command events

I'm working on a sortable listview with data-paging. I've got the listview and paging working fine, but I'm struggling with with the sorting. The sorting in itself is fine; I can sort by a particular column (ASC or DESC), however I'm having problems when it comes to dynamic sorting where the user...

14
голосов
3ответов
10842 просмотров

UpdateProgress linked to Multiple UpdatePanel controls

Is there a way to have a single UpdateProgress control associated with mupltiple UpdatePanel controls? something like this: <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> ..... </ContentTemplate> </asp:UpdatePanel> <asp:UpdatePane...

1
голосов
2ответов
4602 просмотров

FormsAuthentication.RedirectFromLoginPage – really strange and inconsistent results

I’m trying to figure out whether FormsAuthentication.RedirectFromLoginPage (called inside method M()), performs redirection the moment method M finishes its execution, or whether page first completes its lifecycle and only then redirects. But I can't figure it out due to inconsistent behavior...

2
голосов
4ответов
10857 просмотров

Write Outputstream in new window

How can I write an Outputstream in a new browser window? Currently, I have the code below. Obviously it opens the stream in the same window. I know I can write the Outputstream to a file and open it in a new window but that isn't an option. protected void openPDF(byte[] dados) { HttpContex...

3
голосов
2ответов
1400 просмотров

Validation in the business logic - ASP.NET Web Forms

In reading up on ASP.NET MVC I came across some wonderful examples of validation where the business rules were associated with the model and the UI merely displayed the set of errors and flagged the form elements associated with invalid input. I think it makes fantastic sense to keep this logic ...

0
голосов
3ответов
260 просмотров

find which control submitted the form in javascript

HI guys, is there any way to find which control is submitting the form through JavaScript?? also if one defined a JavaScript function to be called on the form submit event is there a way to find the control which caused the submission Thanks a lot

1
голосов
1ответов
1654 просмотров

jQuery + webforms: call an ashx, and refresh an image as a result

Consider an ASP.NET page using the jQuery library Uploadify. Here is the sequence of events on the ASP.NET webforms page: User clicks on a file upload control. Plain old HTML <input type="file" /> User picks an image file from their system using a Browse dialog. All working fine. A jQue...

0
голосов
1ответов
135 просмотров

Having several data access logical components vs having just one

Say DB has three tables: Customer, Order and Products. DAL layer could use just one class ( aka one data access logical component ) to perform CRUD operations on all three tables, or it could use three different classes (aka three different logical components): 1) Customer Data Access Logic Co...

0
голосов
1ответов
82 просмотров

How to change how a User Control is dragged and dropped into source pane

In Visual Studio 2008, if I wanted to drag a user control (that I have created) into the current page/control, I have to switch to Design view before dragging it into the pane. If I try to do it when the document is in Source view, it sends the markup as a hyperlink and not as the <%@ Registe...

0
голосов
1ответов
410 просмотров

Proper Usage of Forms within Master Pages and Content Pages

I am currently trying to make my existing ASP.NET WebForms application use a Site.Master template. Creating the Site.Master template wasn't really a problem as it works like a charm. The problem starts with deriving from it and putting controls in the given ContentPlaceHolder's. At runtime I ...

9
голосов
5ответов
60374 просмотров

How do I get form values to disappear when I enter the field?

I am making a simple form with about eight input fields. I want the initial value in the field to indicate what people are supposed to enter. For example value="name" so that people know to enter there name there. My question though is how do you get the initial value to vanish when they enter ...

1
голосов
1ответов
300 просмотров

Query string parameters and tampering

So let's that I have two dependent objects whose id's i pass in the query string, and let's say I am not going through parent to get the child but rather I read child directly via dao and I can save it also, without going through parent. What should one do on the client side, or should I even che...

0
голосов
1ответов
134 просмотров

Why should BLL layer use method overloads instead of separate methods with individual names...shouldn't it be the other way around?

I don’t understand why is using method overloads( at BLL layer ) preferred over using separate methods with individual names. For example, if our web app has at DAL layer methods GetAllArticles, GetArticlesByCategory, GetPublishedArticles and GetPublishedArticlesByCategory for retrieving arti...

0
голосов
1ответов
2084 просмотров

.net listview find if atleast one radiobox selected in eah row

i have a listview with 2 or more radio button controls in each row of it and i want to findout if atleast one radiobutton selected on submit. for example ROW 1 Quetison 1 radiobutton1 radiobutton2 radiobutton3 ROW 2 Quetison 2 radiobutton1 radiobutton2 ...

6
голосов
3ответов
837 просмотров

How to properly handle errors in an n-tier application?

I have struggled with this since day 1. It probably doesn't help that I've been surrounded by a lot of code that doesn't even handle errors at all. Anyway, I'm working with WebForms in your traditional n-tier design: UI->BLL->DAL. Usually what I do (and I know it's not right) is to try/c...

14
голосов
8ответов
25718 просмотров

C# - How to list out variable names and values posted to ASPX page

I am dynamicaly generating a HTML form that is being submitted to a .aspx webpage. How do I determine in the resulting page what variable names were submitted and what the values were? Using: Request["VarName"].toChar(); Works, but assumes that I know all of the variable names. How can I get ...

1
голосов
2ответов
267 просмотров

ASP.NET and Oracle

I have found this web site really helpful since everybody helps here with the best answers. Now, i need a suggestion. I hope you would help me as before. I need to develop an ASP.NET application with oracle database. Database server is physically separated from the application server. Now my que...

1
голосов
6ответов
100 просмотров

how am I supposed to find out that a form is being submitted twice?

Is something in the http protocol that will help me find out, or should I check the fields by myself. If identical field values can be submitted more than once, should I add a dummy hidden field or something?

2
голосов
5ответов
5037 просмотров

The right way to do radio buttons?

So.. I have been trying to avoid radio buttons at all cost in my web development projects because I just cant figure out the right way to code them. Do you set a label for radio button.. if so, how does that work for screen readers. The way I have been doing most of my forms is by using un-orde...

0
голосов
2ответов
523 просмотров

Non-traditional input using CSS sprites and JavaScript: opinions sought

My client is very invested in using a bunch of non-traditional inputs in a form we are developing for him. The image below represents various states of the interface with the last indicated it is disabled in the current context. The end users will be trained in how to interact with the inputs. ...

1
голосов
1ответов
568 просмотров

Single overloaded method at BLL layer vs BLL methods having one-to-one correspondence with DAL methods

Assume we create 3-tier module, which enables us to display/create/edit articles. Articles are: • organized into categories • before article can be published, admin has to approve it by setting Approve field of Articles DB table to true • by setting MembersOnly field ( Articles table ) admi...

10
голосов
5ответов
516 просмотров

Things that we hated about classic asp but still exist in webforms today

I'm working on a list of reasons for my team to move from webforms to MVC and I thought a good place to start was showing the "why we should migrate" with a set of things both classic asp and webforms have in common. Such as: Spagetti Code (violation of SRP) Classic ASP - each .asp file felt li...

1
голосов
1ответов
613 просмотров

Visual Studio Web Project Statistics

I'm looking for something that can spit out statistics on Visual Studio 2008 web projects, both Forms and MVC. Things like: Number of pages per project Number of user controls Number of classes Number of methods Number of images/CSS File creation dates If the information exists already in Vi...

8
голосов
5ответов
3469 просмотров

Html.ActionLink construct wrong link when a non-mvc route is added

I have an application here with a mix of webform and mvc. I specify the routing as below routes.Add("AspxRoute", new Route("Upload/New", new WebFormRouteHandler<Page>("~/Uploads.aspx"))); routes.MapRoute( "Default", ...

1
голосов
1ответов
124 просмотров

How do I eliminate these order dependencies from my code

In ASP.Net Web Forms there are cases that I've come across that create order dependent code. As an obvious code smell I'm looking for solutions to solve this problem. A pseudo-code example would be: Calling Code :: Page.aspx protected void Page_Load(...) { var control = LoadControl("Contr...