asp.net

iframe's onload event not firing in firefox (related to ASP.NET file uploading)

Main Page: <iframe src="/files/new" onload="alert('onload');"></iframe> and inside the iframe, /files/new renders: <form action="/files/create" method="post" enctype="multipart/form-data" > <input type="file" name="file1" size="28" /> <input type="submit" value="submit" value="Submit" /> </form> If I submit a file, iframe's...

Ajax AutoCompleteExtender with more parameters

I want to use Ajax AutoCompleteExtender for asp.net. I have some expamles but those examples use only two parameters. I want to use three parameters. Some example used a context property. I also checked but it did not work. Can anybody help me. ...

Up to date asp.net page

I have a page in my website which view life information(like bourse info) from database What I want is : refresh a part of the page through the AJAX technics When a new row is added to one of the tables in the database. ...

Get Repeater's Items

I am trying to get all repeater's selected checkboxes of repeater's item just before page movement (pagination), and store them in some place. foreach (RepeaterItem ri in rpt.Items) { CheckBox box = (CheckBox)ri.FindControl("chkBox"); if (box.Checked) { ... } } The problem is where do ...

Validator validating on page load

Hi, I have a RequiredFieldValidator on a textbox and it seems to be firing when the page loads. If however, I set the Display="Static", this no longer occurs, its only when Display="Dynamic" My problem though, is I also have a custom validator on the same textbox control so If I set the display to dynamic on both of these controls, bo...

unable to refer to a server control in netsed lisview control

I have a markup for generating a list of clients and contacts info for each client. So, I am using nested list view control controls for displaying this. The outer listview control item template has a Image button, when clicked should open a popup extender so that I can attach new contacts to the client. The problem is, in popup extend...

Swiching between Http or Https (based on parent directory)

I have a direcory for the members area. All the files within that directory should be treated by https. All other files outside the specific dir should be treated by http. How can i automate the redirecting from http and https and vice versa? Btw, the links are relative. ...

LINQ in ASP.NET -- throws exception when deployed to the server

Hi Everyone, I am connecting to a SQL Server database via LINQ in my ASP.NET application (returning results to a web service). The problem is that it only returns results when I'm running it in debug/test mode - When I publish the service I get an error telling me "Login failed for user 'NT AUTHORITY\NETWORK SERVICE' " So how do I set ...

Does SmtpClient class represent POP3 client or…?

I assume that web controls (such as the PasswordRecovery control) use SmtpClient to send email messages. If so, does SmtpClient represent a POP3 client or does SmtpClient forward email message to POP3 client? Do attributes specified inside <smtp> element in web.config map to SmtpClient class? <system.net> <mailSettings> <smtp de...

Passing unknown amount of parameters in Asp.Net from web form to class

Greetings, I'm passing a form to a class in Asp.net and was wondering is there anyway to pass the number of fields from the form to the class? Currently I have foo(param1, param2, param3, param4, param5) {}; wondering if I could just do foo() { formData.split } Obviously I could just make a data object and pass that to the clas...

ASP.NET project organization

This may be a broad question because part of the problem is that I actually don’t know what the question is. What I would like to know is how you commonly organise ASP.NET applications in terms of placement of pages (aspx), user controls (ascx), server controls and other support classes and utility functions etc. First, let’s assume that...

Login and syntax error

i try to do a login using asp.net 3.5 and sql server 2005 i create a dataset and do this code but something is missing in the code here the code Protected Sub btnlogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnlogin.Click Dim LoginTable As New ClassSet.UsersDataTable Dim LoginAdapter As New ClassSetT...

Using Ajax, is it better to generate aditional markup in the server or the client side?

Which is better in AJAX request, Response with ready HTML or response with just data and write HTML using JavaScript, and this JavaScript will use a predefined HTML template to put the coming data inside and show on the page. Creating the HTML on the server and send to the page, will decrease the client side JS code, but will increase t...

Subsonic in Medium trust level

i host my web site in shared hosting server, this server use the default Medium trust level When i execute this ConfigurationDataCollection configurationDatumCollection = new ConfigurationDataCollection().Where(ConfigurationData.Columns.Name, configurationSectionName).Load(); i get this error That assembly does not allow partially t...

escaping URL request? ASP.NET C#

I have a request to a page that looks like /doSomthing?a=that&ret=url however now i need to login so i must do something like /login?ret=/doSomthing?a=that&ret=url This doesnt work as well as one may hope so how do i correctly escape the return URL then unescape it? I am using ASP.NET with C# ...

Does IIS7 use different default membership provider?

Hello, Say I create CreateUserWizard control and use AspNetSqlMembershipProvider (defined in machine.config) as a default membership provider. Assuming I change default provider's requiresQuestionAndAnswer attribute to false, then CreateUserWizard control template should not be required to provide Question and Answer fields. But if I...

How would you create a user database with asp.net mvc

i am new to asp.net mvc so please be explicit as possible. Here is my goal: i want to create a simple website where users can: Register and log in Enter there contact details(phone, address, etc) View there contact details Edit details of #3. Later in the website, i will create other pages that use this data but for now the only i...

How to create JSON string in C#

I just used the XmlWriter to create some XML to send back in an HTTP response. How would you create a JSON string. I assume you would just use a stringbuilder to build the JSON string and them format your response as JSON? ...

Simplest way of invoking a webservice via SOAP on ASP.NET

I have a webservice on a remote host that I need to invoke from ASP.NET/C# class. What is the simplest way of calling a method via SOAP, given WSDL url and a method signature? Given: WSDL url as string(available only at runtime, i.e. variable) Method signature(constant) Need to: Create a soap client and perform method call. ...

Issue with LINQ to SQL insert . . .

i was looking at an example of how to do an insert in Linq to SQL and here it was it said: NorthwindDataContext context = new NorthwindDataContext(); context.Products.Add(new Product(..)); context.SubmitChanges(); but when i look at the below, (in my case the Table is UserInfo), the Table doesn't have an "Add" method: public System.D...