I'm working on an application with a co-worker at the moment - she is writing a web form that allows users to enter and manage text that will be saved to the database and then displayed within a desktop application.
I'm using a Rich Text Box to display the text from the database. We want to allow the users to use basic formatting (bold,...
I just swiched to a new ASP.NET host and it seems it is behaving differently. In the code for the master page it is attempting too do some different logic for authenticated users by this.
if (Context.User.IsAuthenticated) {
}
But the Context.User object is null. But it's only null on the master page. If I use it on the regular page it...
When it comes to URL Rewriting there are some alternatives these days like the IIS7 module or Urlrewriter.NET. However, as far as I can see those two are based on wildcards which I sadly cannot use.
My problem is that the data I'm working with have no real structure. A made up example:
Something.aspx?page=4 might be /Weapons/Flails/
So...
I'm puzzling with where to place some code. I have a listbox and the listitems are stored in the database. The thing is, where should I place the code that retrieves the data from the database? I do already have a database class with a method ExecuteSelectQuery(). Shall I create Utility class with a method public DataTable GetGroupData()...
I'm currently developing a site in ASP.NET Webforms..
I'm caching things where it makes sence... adding things using High / Normal / Low priority..
telling them to stay in the cache for 2 weeks, 1 week, 4 hours respectably
im showing the current number of cached items on every page (for debug reasons).
sometimes if i travel through t...
I am using JQuery's thickbox to input form data. Would like to auto close the thickbox and send a variable back to the parent from the thickbox form input upon submit.
...
I'm looking for an article that will dive deep into how ASP.NET works and how it renders controls from XML markup. For example, under the hood, how does ASP.NET take the following markup and have it produce the results we see?
<asp:Label ID="MyLabel"><%= myObject.Text%></asp:Label>
Does anybody know of any article that will dive deep i...
1) Is there a way to completely hide the IE scrollbar on textareas? (I'm primarily concerned with IE8) overflow: hidden or auto don't seem to work.
2) Is there a way to stop safari and chrome from "highlighting" focused form elements?
3) Is there a way to disable resizing of textareas?
...
Are there any asp.net server controls that only work with Internet Explorer. I am looking for a list so that I can know what to avoid putting into my webforms application.
I am looking for something like a list of controls and those that downlevel firefox and safari for example. I understand that the client side validation javascript is...
For some reason by css link in a webforms master page is getting mangled by ASP.NET.
The page using the masterpage is located in /subdir1/subdir2/page.aspx
Not sure why it is happening but here is a snippet of the code:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<link href="...
A site has 100's of pages, following a certain sitemap. A user can navigate to page2.aspx from page1.aspx. But if the user goes to page2.aspx directly say through a book marked URL, the user should be redirected to page1.aspx.
Edit: I dont want to go in and add code to every page that needs to fulfill this need.
Note: This is not a cr...
I'm trying to validate a multiline textbox control as follows:
My content page (I'm using master pages) contains a text box control with a custom validator:
<asp:TextBox ID="IssueDescription" TextMode="MultiLine"
Columns="40" Rows="5" runat="server" CssClass="textbox">
</asp:TextBox>
<asp:CustomValidator ID="IssueDescValid...
I would expect this:
<asp:CheckBox ID="CheckBox1" runat="server" CssClass="myClass" />
<asp:RadioButton ID="RadioButton1" runat="server" CssClass="myClass" />
<asp:TextBox ID="TextBox1" runat="server" CssClass="myClass" />
...to render like this (with some attributes removed for simplicity):
<input id="CheckBox1" typ...
I have an extension to this question:
http://stackoverflow.com/questions/183093/vb6-tag-property-equivalent-in-asp-net
The solution to that is excellent, but I want to be able to set the Tag property at design time within the aspx file, ie:
<asp:TextBox id="myTextBox" Tag="thisIsMyTag" .....
Note: I do not want to inherit and exte...
I'm trying to fully understand the WebForm event model (not the page lifecycle, but how the events are wired up when specified declaratively in the .aspx or .ascx files.
Take the Button control for example. It has a Click event that you can wire to in the code-behind, but it has an "OnClick" event in the .aspx/.ascx file.
I used the .N...
I have an ASP.NET webform on which I use a DropDownList control to allow the user to select an item and see related results. For some reason when I set the SelectedValue property of the DropDownList the value it's set to is not immediately available.
Here's my code:
protected void Page_Load(object sender, EventArgs e)
{
if (!Pag...
I'm working on a web forms application which intends to be ported over to MVC for its vNext +1 release. But at the moment it's a .NET 3.5 SP1 web forms application.
I'm wanting to have our own context which provides some helpers on top of the standard HttpContext/ HttpRequest/ HttpResponse/ etc objects. Also, I'm wanting to have decoupl...
Just as the subject asks. Thanks!
EDIT 1
Maybe it's possible sometime while the request is being processed to store a reference to the parent page in the user control?
...
I need to produce with asp.net controls this structure, but ListItem doesn't allow add properties and classes.
What is the best way to do it?
<ul>
<li class="1">SomeText</li>
<li class="2">SomeText2</li>
</ul>
...
We have a large legacy application where we want to start using MVC for new functionality.
To do this we added custom routing, for instance:
routes.IgnoreRoute( "{*allaspx}", new { allaspx = @".*\.as[pmh]x(/.*)?" } );
And we want to share the master page between the old WebForms and the new MVC pages.
This seems simple enough - chan...