I am working on a Web Forms application and I have some HTML code that I need in 2-3 more places.
I've created .ascx control like so which represents the repeated code:
protected override void Render(HtmlTextWriter writer)
{
StringBuilder str = new StringBuilder();
while (connRef.Read())
{
st...
Im staring to get into .NET development for the web. I want to learn the best way to build web sites using c#.
I began reading about 'web forms' but then came across some new 'mvc' way of building web sites.
Which one should I learn?
Thanks for any feedback provided.
...
I have two radio buttons like so
<input type="radio" name="rush" value="yes" />
<input type="radio" name="rush" value="no" checked="checked" />
What I want to do is when the form submit button is clicked, check if 'yes' is selected.
If it is, show a javascript confirm dialog
I've gotten this far, but am stuck, any help would be appr...
I am using asp.net webforms 2.0, c#.
What I need is a simple, elegant way to do the following:
User clicks an element in webform A; Webform B pops up; User interracts with webform B; On closing webform B, probably by a submit button, the source element in webform a a is updated with a value from webform B.
What technologies would be i...
I posted several times but no one would give me an answer that I can understand in plain English. I am new to JSON/JQuery/Ajax/all other cool libs or tools you may advise me on, so keep that in mind.
I am using c# with asp.net web forms (i also have ajax toolkit, but haven't used it yet).
Here is my scenario:
I need to implement a func...
Forms + ASP.NET MVC = Confusing for me:
What are the preferred ways to setup your controller action for form posts?
Do I need to specify an attribute that has [AcceptVerbs(HttpVerbs.Post)]?
Should the controller action take a "FormCollection" or should I use ModelBinders?
If I should use ModelBinders, how?
How do I setup the f...
I'm attempting to make a TinyURL clone in ASP.NET MVC as a learning project.
Right now, all I want is to be able to submit new URLs to my /Home/Create action via a form.
I have my LINQ expression all setup, I have my routing setup, and I have my view setup but something is wrong with my setup.
Routing:
routes.MapRoute(
...
I need to develop a database-based application that offers its users an easy-to-use UI to extend the DB as well as view and edit its contents.
Its users will not be IT-savvy. They're the kind used to filling their data into several excel sheets.
Up to now, those excel data sheets have been manually edited, causing consistency errors. A...
There are lots of articles and discussions about the differences between ASP.NET WebForms and ASP.NET MVC that compare the relative merits of the two frameworks.
I have a different question for anyone who has experience using WebForms that has since moved to MVC:
What is the number one thing that WebForms had, that MVC doesn't, that yo...
Hi,
I have a website with a directory listing of all the pdf files which I have uploaded via ftp. By clicking any of the file names, the pdf document will show up in your web browser. Is it possible for outside parties to digitally signed the document in the web browser and save it back into the server with a appended "signed" on the fi...
Assuming of course we're working with HTML Forms and GET/POST data, backend language agnostic. Asker is most fluent with PHP and Python.
Example:
Tracking event attendance, there is an HTML page for the event administration that lists all available People.
There is a column next to each name with a graphic/widget representing their at...
I'm working on a CRUD site with a lot of very similar forms for adding new data. In other words:
AddMovie.aspx, AddGame.aspx, AddBeer.aspx, AddAdd.aspx
I keep thinking to myself, "Self, it would be really nice to have a single Add.aspx instead of re-writing so many similar pages - plus all those OOP nerds would think I'm cool since I'm...
I have a web application using cookieless forms authentication. Every day my event log has a ton of 4005 error codes (Forms authentication failed for the request). I believe this is happening because users are bookmarking pages while they are logged in so when they revisit the forms ticket in the url has expired, atleast this is the only...
I know, I know, I know. I shouldn't be doing webforms inside of MVC, I completely agree. But, the people who sign my paycheck will not approve a complete conversion of our site to MVC right now. So I am taking incremental steps, page by page, to convert them over while adding new features in MVC.
So my question is how can I access th...
I am using the jQuery date picker calendar in a form. Once submitted the form passes params along via the url to a third party site. Everything works fine, except for one thing.
If the value inserted into the date field by the datepicker calendar is subsequently deleted, or if the default date, that is in the form on page load, is delet...
Thanks to [this question][1] about repositioning the AJAX toolkit's CalloutExtender control, for an answer to my problem of positioning Validator CallOuts on a web form.
Can someone tell me why adding the CSS classes directly to my web page within a <style> element has the desired effect but when adding the same classes to a linked CSS ...
Hi,
I have a form, text input and a submit button. How do I append the value of the text box to the form action i.e.
action="https://www.mywebsite.com/" & txtSessionId
The form looks like this:
<form name="form1" method="post" action="https://www.mywebsite.com/">
<label>Your Sessions ID:
<input type="text" name="txtSessionI...
I have a page that uses a master page, several RequiredFieldValidators, and the Web Toolkit autocomplete extender. The following code only shows the bare minimum of the page:
<%@ Page Language="C#"
AutoEventWireup="true"
CodeFile="Login.aspx.cs"
MasterPageFile="~/master.master"
Inherits="Login" %>
<asp:Content id="...
Hi,
I have a simple form that dumps selected answers to XML file. How to prevent anonymous user from submitting this form many times?
I am not looking for totally bulletproof solution, and I have a limitation that I cannot use the database, and therefore no SqlMembershipProvider.
Will some cookie checking work? How to do this right?
...
Is there a way to shorten the markup for this repeater? I am binding a DataTable to this repeater. It bothers me because ((System.Data.DataRowView)Container.DataItem) is repetitive and makes the markup less readable especially when you have more fields. I am using .Net 3.5 C# WebForms. MVC is not an option. Thanks.
<asp:Repeater ID...