Hi all,
I'd like to find out if a certain type of control exists on a page. It's easy enough to iterate through the Controls collection recursively but I'd also like to check on first load whether the control exists in any of the templates (ContentTemplate, EditItemTemplate, ItemTemplate, SelectedItemTemplate etc) contained in a contro...
Do you find that when you work with a new technology that you're never quite sure what security gaps your leaving in your code?
I've been working with ASP.Net Web Forms for about 5 years now and am fairly confident my code is at least secure enough to stop most known attacks. Looking back a lot of my early code I have unknowingly left ...
I have a Web Forms textbox in a gridview and I want to higlight the text on a button click. textbox.select(start,end) doesn't work. Here is the code:
Dim row As GridViewRow = TryCast(DirectCast(sender, ImageButton).Parent.Parent, GridViewRow)
Dim txtdays As TextBox = row.Cells(2).FindControl("txtDays")
Dim lbldays As Label =...
I want to implement a chat site with following features:
Direct one-on-one chat with a randomly picked stranger
If my conversation partner gets disconnected, I should be shifted to different stranger
In short, I want to imitate http://omegle.com/
Which language is best suited to this task? Jsp and Java? PHP? ASP? Others?
Should a...
I've got a folder in my Web Application, fonts. I'd like to get the path for each of those files in that directory. How do I do that? In asp.net I'd do something like:
System.IO.Directory.GetFiles(Server.MapPath("/fonts"))
...
I'm using ASP.NET 3.5 + Ajax Control Toolkit + jQuery (NO MVC yet)
I'm looking for a standard solution for showing a user control (.ascx) as a modal popup (like the Ajax Control Toolkit ModalPopupExtender implementation), where I can pass parameters to it before it opens. Then get some values on closing, and potentially handle events on...
I am running a website on a virtual directory.
The url for the site is http://localhost/virtalDirectory/pages.aspx
I have an image to be loaded on the page from the following directory heirarchy:
parent directory
..images
....my image
..myPage.aspx
My img tag is
<img src="images/imageName.gif" alt="some text"/>
When loading in ...
Hi,
I have the following route
routes.MapRoute(
"Segnalazioni_CercaSegnalazioni",
"Segnalazioni/CercaSegnalazioni/{flag}",
new { controller = "Segnalazioni", action = "CercaSegnalazioni", flag = 7 }
);
that maps to the following methon of the class SegnalazioniController:
public...
I can wire up Elmah to log Exceptions in my ASP.Net application and it works well.
I also have a requirement to audit interesting events that occur in the application. For example, I must audit the "email address was changed" event and store the old and new email address.
Is it appropriate to use Elmah to log these interesting events? ...
I’m new to .net, though I’ve been writing in classic asp for years. I know it’s time to make the change, but I can’t stand how bloated the HTML becomes.
For example, a simple menu using a web.sitemap and adds over 100 lines of JavaScript and HTML. A simple form with server-side validation adds in masses of ugly JavaScript. And a basic...
I'm really interested in gaining an in-depth understanding of the format and structure of the web.config file for ASP.NET web development. I'd like to know if there's some really easy to comprehend material (apart from the MSDN docs) which can provide me a ground-up understanding of the web.config file and its different sections.
Any su...
We're moving a legacy .ASP application to a new hosting provider that doesn't support Microsoft Index Server, on which one portion of the site depended. The application has a directory tree containing around 10,000 documents (text, MS Word and PDF) whose contents need to be indexed and to be searchable.
The application is staying class...
Hello,
I have a web.config file that contains a section like this:
<configuration>
<configSections>
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
...
When I have a table in database with many rows
and I want to display them by normal line (Not with Gridview). Like:
You teach these classes:
class 1/1, class 2/1, class 3/1
we take (1/1 and 2/1 and 3/1) from database.
how can I do it ?
note: I use LINQ to deal with database.
...
I am using ASP.NET 3.5 with MasterPages. My master page has the script references to jquery and jquery UI. My web page that uses the master page has a script reference for a custom javascript file for that page. This javascript file has jquery calls in it (i.e. document.ready --> set up input boxes as calendars).
When I run the websi...
I have a local website which I run through Visual Studio 2008's internal development web server (through the run / compile button).
I have an external library which is referenced on a page of that website and resides inside the web site's "bin" folder.
I've recently changed a class' property name inside that library (renaming it, from ...
I'm working on an ASP.NET project with an Oracle Database. We are using TOAD to add/manage the stored procedures -- and in general I like TOAD and Oracle. The one thing I've found frustrating is finding a simple way to test an Oracle Stored Proc, such as SQL Server's "exec [SP_NAME] Param1, Param2, ParamN" syntax.
All of our stored proc...
I'm working on a web site written using asp.net WebForms. I'd like two wrap test cases around some of the more interesting subroutines. How can I instantiate the class that comes from the .aspx file in my test project so I can manipulate it under nUnit?
...
I asked a related question on this yesterday, and was told what not to do, but not what I should do.
I've got a master page that I'll call "TheMaster". I've got 2 sub master pages "Sub1" and "Sub2". They both have a Masterpage directive of "TheMaster". Web Forms have a Masterpage directive of "Sub1" or "Sub2". These aren't the real ...
<%Html.RenderAction("Index", "Test", New With {.pagetmp = "test"})%>
I call the above line in my asp.net mvc view. How do i retrieve the dictionary values from the test controller?
...