asp.net

asp.net problem with F5 after postback, cuz it does what it should

i have a web form with a detail and a list view on it, the user fill the data in the fields of the detail view presses the "save" button, and everything is ok for the moment, but if he is pressing F5 after this operation a new record is going to be inserted in the DB, cuz the postback is repeated anybody knows how this could be avoided ?...

Using ASP.NET Controls without databinding

It appears that I have been using asp.net databinding for so long I have forgotten some of the basics. I am dynamically creating a table in an ASPX page without databinding. foreach (XXX x in TTTT){ %> <tr> <td><%=x.val %></td> <asp:ImageButton runat="server" CommandName="uiImgResolve_Click" ...

Authentication through web.config not authenticating in ASP.net 3.5

Hi, This is one of this things that should be extremely simple and I just can't work out why it's not working. I'm trying to set up some very quick authentication for an ASP.net 3.5 app but storing the usernames and passwords in the web.config file (I know it's not very secure but it's an internal app that I keep getting asked to add a...

PageViewer WebPart won't load URL with GET parameters

Hi everyone. I need to show an external website in my SharePoint portal so I have added a PageViewerWebPart. But the URL includes login parameters like www.mywebsite.com?login=X&passwd=Y. I tried to add ASP code at the ContentLink PageViewer property like that : <WebPartPages:PageViewerWebPart runat="server" ContentLink="<% ="URL" %>"...

Control overriding in a .net app

Ok, here we go.. I have a control, which in the assembly.. lets call it "ControlAssembly". There are a load of controls in this, under the namespace ControlAssembly.Controls. So, I want to use this in my website, by adding the <add tagPrefix="ARC" namespace="ControlAssembly.Controls" assembly="ControlAssembly" /> line, as per ...

Invalid File path error in asp.net

I use a simple FileUpload control to select a excel file, retrieve the data and store it to db. When i try to upload after selecting the file i get this error. But file path is correct. "FilePath" is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file ...

DropDownList Items in List

Can anyone tell me shortest way to add all items of dropdownlist in a List<string> I want to populate a List<string> with the values of a DropDownList ...

Updating relationships using Dynamic Data in Asp.Net

Hello guys, I'm trying to write a simple blog post/tag example using dynamic data and a linq data source. I wrote a simple database to store blog posts (title, text) and tags (only a word field and the foreign key) in a sinple one to many relationship and I'd like the user to fill the tags in a single textbox. So I created a TagString...

Inline coding in ASP.NET page

hi guys i am using this code in my aspx page <%for (int i=o;i<5;i++) {%> <asp: link button id=i text=i/> <%}%> at it's producing five link buttons like i i i i i but i just want five link buttons like that 1 2 3 4 5 with id=1,2,3,4,5 respectively how can I can implement that ...

How do you deploy your ASP.NET applications to live servers?

I am looking for different techniques/tools you use to deploy an ASP.NET web application project (NOT ASP.NET web site) to production? I am particularly interested of the workflow happening between the time your Continuous Integration Build server drops the binaries at some location and the time the first user request hits these binari...

How to implement auto unban on website? ASP.NET

How do i auto remove a ban on my website? When enough users flag another user that user will be banned for an X amount of time. Then there is a symbol next to the user name showing he is banned (on all his post, not just profile page). After the X amount of time i want to auto unban and have no sybol next to the username. Whats a nice wa...

DataBinding Vs Looping

Possible Duplicate: Using ASP.NET Controls without databinding My previous question yielded few results so I thought I would reword the question and try again. foreach (XXX x in TTTT){ %> <tr> <td><%=x.val %></td> <asp:ImageButton runat="server" CommandName="uiImgResolve_Click" Co...

datagrid add item to datasource lose viewstate

I do have a page that has a TextBox a Button and a Datagrid. The goal here is simple : Each time I input something in the TextBox and press the Button, it does a little check and then it adds the item to the datagrid and a business logic datasource. The problem is, if I want to make the item appear in the DataGrid I have to do a datagr...

Http 404: Not Found (WebException)

Hi, I am using a console app/class library to invoke a asp.net web service. The class library queries the database and sends the data to the web service. What I notice is that when the amount of data is huge (with 20 columns and 18K records), i get a HTTP 404: Not Found exception from the web service. I have tried increasing the maxReq...

Binding multiple fields to listbox in ASP.NET

I'm fairly new to asp.net and especially LINQ and SQL. Say I have a table "Employees" with fields "Lastname", "Firstname", and "ID". I want to bind this to a list box. I want the list box to display it's contents like "$LASTNAME, $FIRSTNAME" and I want the value of each item to be "ID". It's trivial to bind either name column to the l...

ASP.net Performance and Compile Queries

I have an ASP.net site that is essentially just a user interface for a class library I created. Each of the classes in this class library contain a static definition class with static references to compiled queries. Like so: class MyRecord { /*Some Properties,Fields, and Methods*/ internal static class Queries { ...

Why do ASP.Net server control declarations require the runat="server" attribute?

Surely the fact that they're declared beginning with "<asp:" is enough to infer they're server controls? Or is it just included for completeness (so they look similar to the server control declaration of <input runat="server" for example). Or is there some special reason? It just always bugs me that the compiler tells me I've missed i...

URL and Query management Asp.Net C#

Ok so while back I asked question http://stackoverflow.com/questions/986598/beginner-asp-net-question-handling-url-link I wanted to handle case like this www.blah.com/blah.aspx?day=12&flow=true I got my answer string r_flag = Request.QueryString["day"]; Then what I did is placed a code in Page_Load() that basically takes these paramet...

Any suggestions for components to implement "Send to a friend"?

I have a webpage which I would like users to be able to send to a friend at the click of a button. I am currently using Chilkat's MailMan but I keep getting intermittent problems with it. It seems occassionaly on the first attempt to mail it throws a null pointer exception. Then if try the exact same page again it sends no problem. Are...

How do I force windows authentication with local asp.net development server?

I'm developing an ASP.NET application which needs Windows Authentication. I have the web.config set up to deny anonymous users and use Windows mode for authentication, but my local development version still lets me pass right through to the site. In order to test different user set-ups, I need to force authorization so I can change use...