asp.net

ASP.NET cross domain modal window (window.showModalDialog) - parameter value always "undefined".

Hi, I have two webpages, parent page .aspx and child page .html. On parent page I have JavaScript function for invoking child page as modal window via window.showModalDialog. function viewCourseModal(url) { var sPars = SomeParameters(); var returnedValue = window.showModalDialog(url, "", sPars); document.getElementById("modalReadyForT...

Postbacks and Databinding -- Skipping through part of the page lifecycle?

Ok, I have a UserControl. In it is a textbox and other such things and a save button. I have this UserControl within a Repeater control in the ItemTemplate. Now whenever I first run it, it seems to work fine. When I change the contents of the textbox and go to save it however I get all sorts of null reference errors. The most confu...

How to precompile a Web Application project?

I've heard recently that you can precompile Web Application projects. My question is how? Right now, when I do a publish for my web application and select only files needed to run this application I get it published but it still has all my ASPX pages and it will still only JIT compile the pages. How do I make it so that all of the ASPX...

When writing ASPX, is it unwise to use html in the aspx itself?

I know the question is a bit subjective, but often there is a consensus as to a whether a style should be avoided or is considered harmless. I have elements of actual HTML mixed in with a lot of my ASP.NET markup. I don't know enough about what goes on in the background to determine whether this should be avoided or if it is harmless. ...

Form Authentication on Purely HTML pages

Hello! I am using forms authentication in IIS7 to password-protect a dev site, but the authentication seems to get by-passed when the site contains only static HTML files + login.aspx + web.config. When I renamed the files to .aspx, I am prompted with the login form I am not doing anything fancy. I have a very simple login script and i...

Is there a way to trap all errors in a AJAX-web service?

I'd like to trap any unhandled exception thrown in an ASP.NET web service, but nothing I've tried has worked so far. First off, the HttpApplication.Error event doesn't fire on web services, so that's out.. The next approach was to implement a soap extension, and add it to web.config with: <soapExtensionTypes> <add type="Foo" priori...

xhtmlConformance="Legacy" causing layout issue on server

I am using the UniqueId to get the name of a textbox on my page. When I have xhtmlConformance="Legacy" in the web.config, the name is renders with a colon. I removed this and the name is rendered with a dollar ($). On my Windows 7 development machine this works fine. When I push to production and the page is rendered, the name is cor...

Asychnronous Message Send Asp.net

I'm trying to learn about how AJAX stuff works under the hood. Say I have an asp.net form with a button on it. I then have a database with a single column DateTime. When I click the button on the asp.net form I want to insert a column in the database with the current time. I'll have a C# event handler: protected void btnButton_OnCli...

INSERT / INCLUDE Text file content inside HTML page.

Hello Everyone!!! I've got kinda MLM site to make, Like be a member buy purchasing any product of company and create other members under you, in your downline and for that you get commission in product they buy. This is the concept. But, that company is providing a website as its Product. Now, That product is a Website, Where From 100 r...

How to get url of the website in iframe?

hi, how can i get url of the website which is in iframe, when i click on any links in website in iframe it is redirect to another page in the iframe then how can i get the page url. can u help me. thank you. ...

asp.net page load time

My question is that how to maintained page load time in c# and what page time load is good for site to crawl google index ...

asp.net gridview

I have a gridview which contains columns of my desire to display. But I want to access a value for data row of a gridview which is not displayed in gridview but it is in datatable for that particular row. Initially what I did is display it to gridview as well as I accessed its value using index, but I really don't want to display its val...

How to read cookie that written in login method ?

If the login code int http://msdn.microsoft.com/en-us/library/system.web.security.formsauthenticationticket(v=VS.90).aspx we will found that they create cookie as below new HttpCookie(FormsAuthentication.FormsCookieName, encTicket) I want in another code to read this cookie and check it .. how can i do although i don't know the nam...

track error on defaultRedirect ?

Hi guys, I've added this in my web.config: <customErrors mode="RemoteOnly" defaultRedirect="~/Site/Statics/Eroare.aspx"> <error statusCode="404" redirect="~/Site/Index.aspx" /> </customErrors> Well, in Page_Load method on Eroare.aspx page i try to print to my internal logs the error which caused this redirect but Se...

Prevent multiple users on a page at a time

What whould be the best way to prevent multiple users on a page? For example if a user is at the page "Home.aspx", no other users should be allowed to go there. I'm using asp.net on the server and the js-frameword jQuery on the client side. ...

grid view validation problem

in a grid view how can i apply a validator to check if any of grid view rows with check box are checked or not. i did it using the custom validator like this but giving the error "Control 'GridView1' referenced by the ControlToValidate property of 'gridCheck' cannot be validated. " following is my code what should i do please suggest me...

How to expose async method's event?

I have a webservice method getContactsAsync. I've understood that when it's completed it's supposed to raise an event. How can I (still asynchronously) find out when the method is done and use the result? public void GetContacts() { webService.getContactsAsync() } public void GetContactsCompleted(object sender, getContactsAsyncComp...

What layer does a UserControl's base class belong in?

I have an asp.net usercontrol (ascx) that inherits from an abstract class (that inherits from a UserControl). My Project is in a 3-tier architecture (DAL -> Bll -> UI/Views). Currently there are no class files in the UI layer (other than the code-behinds). Which layer should I add this abstract class to? Thanks so much. ...

Crystal report related problem on server

I uploaded my project on server then i am facing the following problem, while it does wok fine on local. Could not load file or assembly 'CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. What is this problem please let...

my connecton in global.aspx

I need my connection in global.aspx what do i do. I want this code to be in global.aspx so that on other page i will just call OpenCon and CloseCon. Dim mySqlCon As OleDbConnection Dim strConnection As String Sub OpenCon() strConnection = ConfigurationManager.ConnectionStrings("UAFConnectionString").ConnectionString myS...