asp.net

Unlocking asp.net mvc templates in VS 2008

Ok so i downloaded the asp.net mvc through the web platform installer. Rebooted the machine and fired up VS 2008 express. Lo and behold there were no website/project templates that could setup an mvc project. I did a little research and found out they would not show up in the express version. No matter - i got team suite edition too so i...

ASP.Net - Strange behavior of nullable types in Application_EndRequest

I am using Global.asax to perform logging at the end of each request via the Application_EndRequest event. However, I am seeing some odd behavior of certain values stored in the HTTPContext.Current.Items collection. Below is the debug output for a nullable Enum. You can see that there is a value, but HasValue resolved to False?! {Syst...

ASP.NET - IIS Custom Mapping Extensions - How?

I am wondering how one goes about creating/rerouting my custom developed .ASPX pages on IIS 6.0 pages to something totally custom w/o the .aspx extension, say, .vato? For example, instead of my page saying: Default.aspx?ID=123, I would like users to see: Default.vato?ID=123. What concept is? Is this doable? Where can I research mor...

How to set the return value of one ObjectDataSource based on another ObjectDataSource

I have two Asp.net ListView Controls bound to two different ObjectDataScource Controls. Each ODS control references 'MethodA' and 'MethodB'. I want 'MethodA' to make one call the the database and return data for both 'MethodA' and 'MethodB'. I could always have 'MethodB' make a second call to the database, but that would not be ef...

When to update index with Lucene.NET? Async or not?

Is it generally fast enough to make simple updates synchronously? For instance with a ASP.NET web app, if I change the person's name... will I have any issues just updating the index synchronously as part of the "Save" mechanism? OR is the only safe way to have some other asynchronous process to make the index updates? ...

How to get a handle to a dynamic imagebutton in an ajax panel postback

I write an imagebutton to a table cell in a new row when a user selects an item in a list: ImageButton imgbtnRemove = new ImageButton(); imgbtnRemove.ID = "uxStandardLetterDeleteImage_" + items.letterName; imgbtnRemove.CommandName = "uxStandardLetterDeleteImage_" + items.letterName; imgbtnRemove.ImageUrl = items.remove; imgStatus.Altern...

Security Exception When Deploying Asp.net web application in Shared Hosting and Things to Consider

I'm looking to deploy a ASP.net web application in Shared Hosting. I'm getting Security Exception, System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Any help to fix an...

ASP.NET CheckBox disabling postback with javascript

I'm trying to wire up a CheckBox to handle an event when check/unchecked. If the user has JavaScript enabled, use that, otherwise use a postback. Here is my code: <asp:CheckBox ID="ApplicationInProcessCheckBox" runat="server" Text="Application In Process" AutoPostBack="true" oncheckedchanged="ApplicationInProcessCheckBox_Che...

How do you get the IP address from a request in ASP.NET?

I have been trying to figure this out but cannot find a reliable way to get a clients IP address when making a request to a page in asp.net that works with all servers. ...

i want to refine the results obtained from a search

I am using sql server 2000 and asp.net with c# for making a search engine and i want to refine the results obtained from a search without making server connection again and again due to speed factor how can i make my search fast?..............how can i make sql server connection lesser?... ...

Which control posted back my page? (ASP.NET Page)

1 -I wonder that how to get which control posted back the page and is there any way to convert Request["__EVENTVALIDATION"] value string to understandable string. 2- in which order components will be bind and how do they get their value from viewstate? Thank 4 all your helps... ...

jQuery Login modal popup for ASP.NET 2.o Page

Dear All, I have an ASP.NET web page(Not MVC ) (HomePage.aspx) and another page (PRiceList.aspx).I have a login feature in my Home page.So when a user logged in the site, They can go to the pricelist.aspx page easily using a link in homepage.If some one is entering the page with out logging in , I want to show a modal login box (backgro...

How much ASP.NET should I learn if my final goal is ASP.NET MVC?

Starting from scratch with very little knowledge of .NET, how much ASP.NET should I learn before I start to dive in ASP.NET MVC? ...

How to add static list of items in MVC Html.DropDownList()

I would like to assign a static list of items in a SelectList() to a Html.DropDownList() in ASP.NET MVC, what is the best practice? I was about to try to find a way to use new SelectList(new {key = "value"}... but one, that didn't work, and two, would I be breaking a law here, should my static list be declared in ViewData anyway and pas...

read client certificate from httprequest C#

I am trying to read an X509 certificate using Request.ClientCertificate but nothing is returned. The certificate is definitely being attached to the request because I can get the certificate information from the page sending the request. I have tried reading the certificate from several different places but cannot seem to get it to work...

What is the best way to call/start a Windows Service every x seconds?

I have a Windows Service which is basically accessing a mailbox and reading the emails. I am trying to figure out the best way to check the mailbox every x seconds. One method is to just call Thread.Sleep, then call the Start Method again, e.g. protected override void OnStart(string[] args) { // get config settings CheckMailb...

After open attachment page events not work in asp.net

On a page, i open an attachment on link button click by set PostBackUrl as lnkCalendar.PostBackUrl = "AddScheduleToCalendar.aspx?scheduleGuid=" + scheduleGuid; After save or close attachment, currentlly open web page buttons click still open same attachement again thier own click event donot work. If untill not click attachment link...

How can I pass a Textboxes value to my Ajax.ActionLink?

In my ASP.NET MVC application I want a user to add a value into a textbox and then press my Ajax.ActionLink. I want to do something like this: Ajax.ActionLink("Go", "Action", "Controller", new { value = textbox1.value }) Or how else can I get this textbox value back to my action? Jquery? ...

Using Yes/No Messagebox in Updatepanel AJAX.

I have a requirement where I ask user for confirmation and also display messages. The programmers used for this were from Windows forms background. Hence have used the MsgBox in every nook and corner. Even in business logic part they have used the Messageboxes which requires Yes/No style confirmation from user. When we tested the site ...

ASP.NET GridView problem..

Well i have a gridview where i have defined the columns on my own and turned autogenerating off but now i have the problem that i cant access GridView.SelectedRow.DataItem. As it turns out to be null now, when it had a value when auto generation was turned on.. Edit: What i need is a way to save the ID of the row while not showing the ...