webforms

How do I attach a prefix to each keyword on submit of input field?

I have an input field which when the enter key is pressed (as there is no submit field) I would like javascript to add the @ character infront of each keyword when the form is submitted. For example: The text would be entered as... home, personal, call But the value that is submitted would be... @home, @personal, @call So far I hav...

Asp.Net website looking fine in IE6 but not in IE7/IE8

I have a small website developed using VS2005 and mySQl, it's just 2 webforms and login page. During the development and testing phase, me and my customer were using IE6, and it was looking fine, we didn't test with other browsers because it's a small application, and just a add-in for large desktop application. The customer informed m...

What is the best way to code up a Month and Year drop down list for ASP.NET?

I have an internal application that I needs to have a drop down list for two date type elements: Month and Year. These values are not in a database or other repository of information. I know I could just setup a list with the values I need by adding them to a dictionary like object (I need to correlate the Month to the numerical repre...

How to set a checkbox to "checked" using mshtml?

Hi, I can do most things I need to with mshtml, but I'm a bit stuck with how to set a checkbox input element to "checked". Here's the situation... IHTMLElementCollection inputElements = (IHTMLElementCollection)doc.all.tags("input"); foreach (IHTMLElement el in inputElements) { string elementHtml = el.outerHTML; string termsOfSe...

.Net Repeater equivalent for a single object?

Hi, Could someone try to recommend the best cause of action to solve the request below: I have created a number of extended classes using the Repeater class as a Base and love the flexibility, the ease and the results of doing this. What I want to to do now is to make a similar Custom Web Control for a single object (i.e the DataSource...

After Refresh(F5) the Page the Check's CheckChanged event is not fired,the Check is child control of Gridview .

I have 3 gridview control in my page. each grid itself i am using check box as a TemplateField.when i am selecting the first grid check box. it displays some records.In this time when i am press the F5(Referesh) button.All the events in the Page not fired. check box in the Grid: <asp:GridView ID="gvSelectQuest" runat="server" AutoGene...

jQuery Autocomplete losing text on AutoPostBack

I have a jQuery Autocomplete field on an ASP.Net Webform and everything has been working great until now. I also have a DropDownList that I have a need to fire onSelectedIndexChanged with AutoPostBack. When I changed my code to do the AutoPostBack, the text field that has the jQuery AutoComplete on it comes back blank. However, if I lo...

Django: custom constructor for form class, trouble with accessing data from request.POST.

Hello. I have written custom constructor for a form, the whole form class looks like this: class UploadForm(forms.Form): file = forms.FileField(label = "Plik") def __init__(self, coto, naglowek, *args, **kwargs): super(UploadForm, self).__init__(*args, **kwargs) self.coto = coto self.naglowek = naglowek...

Tricky problem with ASP.NET web forms resources and localization.

I've got the following nonstandard setup (VS2008, .NET 3.5 SP1): There is a main web project called MainSite and There are several "plugin" web projects with different names. When building these plugins I have a custom build step that calls aspnet_compiler.exe and aspnet_merge.exe. This results in two .DLL files - *plugin_name*.dll and...

ASP.NET webforms - is meta:resourcekey unique or can we create our own metas?

The subject pretty much says it all. How does the meta:resourcekey attribute work, and can we create our own meta:stackoverflow tags with whatever functionality we desire? ...

How do you stop RadioButtonList Label text from wrapping under the button

I have a radio button list and some of the labels are quite long so they wrap and the second line appears underneath the radio button. Ideally I would like the text to wrap with the second line starting beneath the first character of the first line. Any ideas on how? or would I have to make my own list based control for this? ...

Is it possible to share a masterpage between MVC and webforms?

I am adding MVC to a project that has MANY legacy webform pages. This works fine. However, I currently have a separate masterpage for MVC and for the webforms. The two master pages produce essentially identical output. I'd really like to kill the webforms one and just use the MVC master page with all my pages and stay DRY. Not bei...

webform or winform, how to choose?

What would be the normal way to decide which way to go? In my case, what if user-base was under 10 persons you have no control over CAS but can install the framework needed to import/export let say excel file/pdf would be intranet security is really important business logic is somehow complex ...

What are these called <% ... %>? And what ways can they be used in a page.

In a .Net web form... What are these special tags called? I know of 2: <%-- comment --%> for comments and <%# used with Eval and Bind #> So what does the # signify? Are there more? I know you can put some basic logic and function calls in there but I've never found anything that really describes how that can be used and should be...

How do you indicate where the form_tag is submitted to in Rails?

I'm new to Rails and am not sure how to specify where the form_tag submits to? <% form_tag do %> <%= submit_tag "checkout_submit" %> <% end %> In the case of the example above, does this form submit itself to the "checkout_submit" action from the same controller that rendered this view? ...

visual studio 2008 / asp.net web forms - is hand coding ~80% of the time too much?

I still find myself hand coding Visual Studio projects more than using the variety of UI-driven menus and dialogs. For example: web projects: hand code html/css in Source View vs dealing with the Design View / Properties Window flushing out class files: code by hand using stuff like the prop-TAB-TAB Create Property keyboard shortcut a...

ASP.NET MVC vs. Webforms vs. HTTP Handlers (.ashx) - which is the most lightweight?

I plan on building a simple, yet high usage webapp and need to settle on an architecture. basic server side logic / dynamic db driven content about half a dozen to a dozen pages serving up all said content no need for URL rewriting, pretty simple page flow/routing The objective is to publish this app to use the least amount of band...

Is it possible to initialize a Control's List<T> property in markup?

Let's say we have the following: public enum RenderBehaviors { A, B, C, } public class MyControl : Control { public List<RenderBehaviors> Behaviors { get; set; } protected override void Render(HtmlTextWriter writer) { // output different markup based on behaviors that are set } } Is it possible to...

Can asking a developer whether he prefers WebForms or MVC be a good indicator of his proficiency?

I've just had an interesting thought. It has been a while already since some of us have enjoyed the new MVC framework for ASP.NET. We have talked about it, compared them, liked or disliked one or the other at a different point of time, argued about them each protecting his own point of view. Now it is somewhat silent. He who wanted to g...

ASP.NET 3.5 Web Application Project takes excessively long time to initially load

I have started work at a new company and the main project I work on (an ASP.NET 3.5 Web Application Project) takes an excessively long time to initially load (Around 1.5 minutes) I am aware that this is generally the nature of web app projects but my issue is this seems way too long. Ive tried several things to try and pinpoint what mi...