asp.net

How to get a null value from database to a checkbox in gridview

hi guys, i have a checkbox in gridview. <asp:CheckBox ID="chkStatus" runat="server" Checked='<%#GetStatus(Eval("VaccinationCompletedStatus")) %>'/> The function GetStatus is as follows Public Function GetStatus(ByVal objStatus As Object) As Boolean If objStatus = True Then Return True ElseIf o...

how can i use foreach method instead of for method witn remove method of listbox?

How can i use second method instead of first? first (web user control) public void Remove() { int count = this.ListBox1.Items.Count; for (int i = count - 1; i > -1; i--) { if (ListBox1.Items[i].Selected) { ListBox1.Items.Remove(ListBox1...

Simulate domains locally in ASP.NET /IIS7

I would like to simulate that my ASP.NET application is hist by say simdomain.com. How can i do that easily? Ideally I would like some kind of filter, so requests to certain domains are routed to localhost, and it should be easy to turn it on and off. ...

Visual Studio Toolbar

In Visual Studio: New->Project->ASP.NET Web application New->Website->ASP.NET Website What is the actual difference between these two, though we are opening webapplication? ...

Inline code in ASp.Net menu item

Hello Does anybody know if it is the way to set control's child attributes properties by inline code? I mean something like that <asp:MenuItem Text="text" NavigateUrl='<%# GetItemURL("val") %>' ></asp:MenuItem> CodeBehind protected string GetItemURL(string tag) { if (string.IsNullOrEmpty(_pageUrl))...

Run test cases

I have the Test cases in remote machine . After build completed i need to run all the test cases from remote machine. thru mstest / c# /vb.net ...

When and where does a UserControl compile.

I have a page, Default.aspx, and a UserControl, HelloControl.ascx. In the page, I dynamically instantiate the control as follows: protected void Page_Load(object sender, EventArgs e) { HelloControl c = Page.LoadControl(typeof (HelloControl), null) as HelloControl; c.Greet(); } This works fine, and the user control writes "Hel...

ASP.NET Site Membership Fee Processing

I am building a site where people will sign up and pay to use an online web app (a yearly fee). What I've been looking for, but can't seem to find is a very simple checkout/order processing component for this type of scenario. I really don't want or need a full-blown shopping cart with product pages, etc., since we're really only selling...

Rad Grid prerender event Issue

Can any one tell me the things happening in this section,,Why they are making item as invisible protected void rgStateTax_PreRender( object sender, EventArgs e ) { if( rgStateTax.MasterTableView.IsItemInserted ) { foreach( GridItem item in rgStateTax.Items ) { ...

When to use Application_Start vs Init in Global.asax?

I am wondering under what circumstances I should be putting application initialisation code in Application_Start() vs Init() in my Global.asax file? The distinction between the two doesn't seem very obvious to me, other than Application_start gets called first, then Init(). Why would I use one over the other? Does it really make a di...

How to implement "get latests changed items" with ADO.NET Data Services?

Hi Lets say I have a lists of entities (for example, a list of TODO items) that more than one user can change, delete from and add to at the same time. So to maintane a synchronized listed between all the clients, I want each client (AJAX based) to ask for changes every xx seconds. Since the list can get veeery long, I do not want to d...

Standardized email regex

Why is there not a standardized email regex? I was recently involved in a project where we had a hickup where the email passed our email regex but failed when creating the MailMessage object. A small error but it had rather big consequences Is the MailMessage constructor using a email regex when checking if an em...

System.Web.Abstractions: what is it good for?

... absolutely nothing? What part of the puzzle does it fill for ASP.NET WebForms and ASP.NET MVC respectively? Can you somehow create a ASP.NET * base-application which uses System.Web.Abstractions so it can be used in both kinds of ASP.NET-web applications? In that case, how did they retro-fit the classes in System.Web.Abstractions ...

Navigation images not displayed properly in jQuery lightbox

From this aspcode.net page at the bottom (under attachments) you can download the project. For some reason when I run it the Close Button and the Next and Previous Buttons don't work. Well I mean it does work but it does not show the actual images. Can anyone figure it out? It should be easy but I just cant get it to work. ...

Installing nUnit with ASP.Net MVC 1.0

Does anyone have any advice/information on how to install nUnit with ASP.Net MVC? I have seen previous posts which related to the preview releases and involved a ghoulish nightmare of having to create template files, run command prompt and even mess with the registry. Obviously this is far from ideal and given Microsoft's intention to ...

Parser error when trying to access the ASP.NET password recovery page?

When I try to access my ASP.NET password recovery page, I get the following error: Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load ...

Display a Photo Gallery using Asp.Net and SQL

I have recently added photos to my SQL database and have displayed them on an *.aspx page using Asp:Image. The ImageUrl for this control stored in a separate *.aspx page. It works great for profile pictures. I have a new issue at hand. I need each user to be able to have their own photo gallery page. I want the photos to be stored in th...

why do i get a parser error when trying to access the asp password recovery page?

Duplicate: why do i get a parser error when trying to access the asp password recovery page When i try to access the page where my asp password recovery form is i am getting this error: Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error deta...

Asp.Net System.Web.Routing Find actual .aspx Page

I'm using System.Web.Routing to have some better URL's and have come across a problem. I need to know the actual page that's handling the request. for example a request comes in as: /basketball/home I need to find the page that handles that request, like: /management/default.aspx I'm only using the System.Web.Routing and not MVC...

Viewstate Compression Issues [Resolved]

I'm currently fighting with the .NET Viewstate and it is starting to wear me down. Having found that some of the pages in one of our applications is made up of around 80% viewstate I have looked into reducing this where I can. I have looked at (and am happy with) disabling viewstate for controls that do not need it (labels, buttons etc)...