asp.net

web.config: Changing an application setting with C#

How can I change an application setting within a web.copnfig programmatically with C# (from another application, which configures the web-application)? The following code snipped doesn't work, because AppSettings[...] is readonly! configuration = WebConfigurationManager.OpenWebConfiguration(...); ConfigurationSectionGroup configuration...

How to restrict date selection in ajax calender

Can anybody tell me that i have two text boxes with two ajax calender and i want to restrict that the date in first textbox that is selected by calender should be less than the second textbox's date.how to do that...??? ...

Detecting if JavaScript is enabled on a Mobile browser in ASP.Net

I want to check if a mobile browser has javascript enabled before displaying a page to the user. The code I've found from my research is: System.Web.HttpBrowserCapabilities browser = Request.Browser; Response.Write(browser.EcmaScriptVersion.ToString()); So to ensure that javascript is enabled on a browser, you need to check wheather t...

Nested ListView problem in Firefox/Safari

I have a ListView in which I set the following: - the 'tr' of the ItemTemplate has an id set to 'credits<%#Eval("ID")%>' - the first column is an asp:Literal control named "literalTreeIcon". In the OnItemDataBound event I am doing the following: Literal treeIcon = e.Item.FindControl("literalTreeIcon") as Literal; if (treeIco...

How to stop asp.net to send a faulty response

I'm working on a functionality in my asp.net web site that enables the user to download some files as a zip file. I'm using the DotNetZip library to generate the zip file. My code looks like this: protected void OkbtnZipExport_OnClickEvent(object sender, EventArgs e) { var selectedDocumentIds = GetSelectedDocIds(); s...

regular expression validator

<asp:RegularExpressionValidator id="RegularExpressionValidator1" ControlToValidate="toAmountTextBox" ValidationExpression="^\d*[1-9]\d*(\.\d+)?$" Display="Dynamic" EnableClientScript="true" Text="* Please Enter valid amount" runat="server" /> This code validates but shows the error message in ...

How to override the stylesheets embedded in the Telerik assembly??

Embedding RadEditor in my page but Master page's CSS is screwing it up ..like Editor's content area is inheriting background-image property of the body tag when I want it to be white..drop down lists inside of Editor too are not displaying correctly..I don't wanna create whole new custom skin ...

programmatically change table names in .net strong typed dataset

hi I've developed an application using strong-typed dataset with .net framework 3.5. is there a way to change the source table for a tableadapter programmatically? thnx ...

Page.User.Identity.IsAuthenticated still true after FormsAuthentication.SignOut()

I have a page that when you press 'log out' it will redirect to the login.aspx page which as an page_load method which calls FormsAuthentication.SignOut(). The master page displays the log out link in the top right of the screen and it displays it on the condition that Page.User.Identity.IsAuthenticated is true. After stepping through ...

modelstate validation in asp.net mvc 2.0

Hi Friends,I have implemented customised registratio page by extending the membership provider using profile provider.I successfully registered the user .Now i want to validate the fields of registration page.Built-in Registration page has builtin validation messages. Bu in my coding i am not passing model to the registration action, ins...

Add subscribe button to feed asp.net

Hello Everybody, I have built an RSS feed and consume it in asp.net page. In this page i want add a button that enables users to subsribe to the feed so that they stay updated with news(and informed). If is that is not possible,should i work with a third party(feedblitz,...) Thanks. ...

ObjectDataSource not showing up Data Objects in Configure Data Source

Hi, I am using visual studio 2008, i included a class in the AppCode folder and wated to use its functions in ObjectDataSource. ...

table cell vertical scrollbar remains disabled

TableCell newCell = new TableCell(); newCell.ID = "Cell" + i.ToString(); newCell.Style.Add("BORDER", "thin solid"); **newCell.Style.Add("overflow-x", "scroll"); newCell.Style.Add("overflow-y", "scroll");** newCell.Style.Add("WIDTH", "20px"); newCell.Style....

Difference between ASP.Net, C#.Net and VB.Net?

Hey, I just need clarification about something. I am currently job hunting - I put my CV on Monster on Monday and have had about 8 agencies phone up about jobs they have available. One of them said that he notices VB.Net is on my CV but asked if I know ASP.Net. I replied that ASP.Net encompasses both VB.Net and C#.Net - as far as I kno...

Find Control Asp.net

i have created <input type="checkbox" id="test" > using literal.. now i want to get this control so i can check if its checked or not.... how do i find this control in the aspx.cs page? ...

"Could not load App_Web_*.dll" Exception after ASP.NET compile & recycle

I recently came across code of the following structure: FooService.cs FooService.svc Default.aspx Content of the files: [FooService.cs] using System.ServiceModel; namespace FooService { [ServiceContract] public class FooService { static FooEngine engine = new FooEngine(); [OperationContract] pu...

Application buggy after installing IE 8.0

The HRIS app in my company is a asp.net web application which started showing bugs after IE 8.0 was rolled out on our company intranet. Few people open multiple instances of the app with different credentials, now since IE 8.0 has this session sharing feature on different browser windows, the sessions in both windows become the same but ...

Can loading and resizing an uploaded image be dangerous?

I have ASP.NET form with an upload control for users to post an image. On the server I load that image (using the Bitmap class) and resize it. Is there any danger in doing that when users upload malicious or affected files or will the code just throw an exception at some point and stop the whole process? ...

How to Findcontrol when we use literal to create it..

I am using a panel and then I create a literal in it, than I create : string temp =" <input type="checkbox" id="forum0"> <input type="checkbox" id="forum1"> <input type="checkbox" id="forum2"> <input type="checkbox" id="forum3"> <input type="checkbox" id="forum4"> <input type="checkbox" id="forum5"> " ... and then assign this sting t...

Why do I get "Access is denied" when re-loading an allready running XBAP?

I'd like to embedd a XBAP in a SharePoint Web Part. My approach is to load the XBAP (on the same server) using an IFrame. If I load the Web Part for the first time, it works. However if I navigate to some other page within SharePoint and return back to my Web Part, I get "An error occurred in the application you were using" and "Acce...