asp.net-3.5

Binding a List<string> to a Listview in asp.net 3.5

How do I bind a List to a in ASP.NET 3.5 <asp:ListView ID="lvDiagnosisCodes" runat="server"> <LayoutTemplate> <ul> <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder> </ul> </LayoutTemplate> <ItemTemplate> <li> ...

How to send a file to a client so a Download dialog will open?

I have a file, say a PDF on my website and when a user visits a page I want to display a download dialog for the pdf on page load or a button click. I did a google search and I found two ways to do this but wondering what is the accepted way of doing this? I am currently doing this string pdfPath = MapPath("mypdf.pdf"); Response.Conte...

T-SQL - Return custom error message and end query

I have a lengthy stored procedure in which I would like to do something like the following: IF @SubPageDirectory IS NULL BEGIN RAISERROR('@SubPageDirectory cannot be NULL', 10, 1) EXIT STORED PROCEDURE END Basically I wish to check whether my variable is NULL, and if it is, return an error message to my .NET Web Application, a...

Problem with cascading drop down in asp.net

Hello friends, I have two cascading drop downs on my page i.e. ddlInsCompanies and ddlInsAdjusters. Both the DDLs are data bounded using a web method from web service. The Cascading DDLs are working fine and i am able to save data as well. The problem here is that when i try to open up the record, the selected value for ddlInsCompanies...

Strange logging off on ASP.NET 3.5 website

Please help me I'm getting desperate here trying to find the problem, and I don't know where to start looking for it. Here are the symptoms: I've noticed, that when a user logs on in the morning, he is then immediately logged off, then when he logs on again, everything is fine and he can work on the site. Every once in a while, when t...

how to include days of previous month in a calendar

I have a calendar for day view, month view and week view. In month view all the days in the particular month (month which user selects) will be displayed in a grid. Suppose if a month begins by wednesday/thursday then the cells of monday, tuesday remains blank. Instead I need to display last two days of previous month and similarly if th...

Problem Creating Instances of ASP.NET User Controls Programmatically

I am able to create controls pro grammatically using the code below without issue: FileListReader fReader = (FileListReader)LoadControl("~/Controls/FileListReader.ascx"); phFileLists.Controls.Add(fReader); However, I would like to change the control so that I can give it a constructor like this: public FileListReader(Int32 itemGroupI...

Click event handler with Custom Control Button

I'm creating an ASP.NET Custom Control for my web application which is basically an ASP.NET Button control contained inside multiple <div> elements (for styling purposes). How can I create a Click event handler for my custom control so that my control acts as an ASP.NET Button? Ie. <cc:Button id="myButton" runat="server" Text="Submit"...

How to write database value in text file on defined format

I read a delimited text file into dataset. i am writing these dataset values line by line in another text file. my C# syntax is : try { DataClasses1DataContext db = new DataClasses1DataContext(); var r = from p in db.Products select p; //DataTable TarGe...

Large datsets .net and SQL server?

I have a project where I need to pull in a lot of records and modify them based on some criteria. Basically, we have a system where users can upload documents. Those documents get tagged in the database for validation reasons from other users. We validate the files based on certain criteria and then mark them as being valid. So we have...

Show combo on AspxGridview

*i work on northwind database .*In my AspxGridview i want to show comboBox.I fill grid on back end C#.i also want my combo will fill back end. <dxwgv:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" KeyFieldName="CategoryID" oncelleditorinitialize="ASPxGridView1_CellEditorInitialize">...

How to save html table data to SQL Server 2008 Table Value

**http://www.dsebd.org/latest_PE_all2_08.php** above url contain a html table.I want to save this table value on XML and also want to save this table value on database MS2008. How to save html table values on database ...

LINQ to Entities attaching and detaching foreign key entities

I am currently using LINQ and the Entity Framework to do my database connection layer. In my database I have a Files table and a Products table. I also have a ProductHasFiles table that joins the 2 in a many to many relationship. My issue is this. I have a single file loaded in my context and I have a list of Product IDs that I need t...

How to save in database

http://www.dsebd.org/latest_PE_all2_08.php above url contain information want to save is database ms2008. How to save this value . ...

ASP.NET Markup Intellisense not working in Visual Studio 2010

When I type < in the Markup Mode of Visual Studio 2010, I don't get any server-side controls (ie. ), I just get a list of standard HTML controls. This used to work, but one day just stopped. Why could this be? P.S: I'm a VB.NET Programmer, and the .vb files intellisense is working fine. ...

save DataTable to database

Hi, I am generating a DataTable from a webservice and i would like to save the whole DataTable into one database table. DataTable ds = //get info from webservice The DataTable is getting generated but What to do next .I am getting stuck .Show me some syntax.I dont really need the select statement there either, i just want to insert al...

Problem updating LINQ results with anonymous type...read only?

Hello, I'm learning LINQ and have run into a problem. I created a simple query against the northwind db, and I'm shaping the fields that should be returned. The problem is After run , I can't modify any of the fields in my AspxGridView . <dxwgv:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" KeyFieldNa...

how to use HoverMenuExtender in asp.net 3.5 ajaxtool kit

hi i m using HoverMenuExtender in asp.net 3.5 ajaxtoolkit but it does not work can anybody help me ...

Linq dbml show int return type for an SP which SP return some fields from temporary table.

I have written a Stored procedure which return some fields from a temporary table which i create in this stored procedure. but when I include it in my dbml file it show return type of my stored procedure as int. which should be not as am returning field from table although its temporary. ...

What's problem on linq databinding

<dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" KeyFieldName="CategoryID"> <SettingsEditing Mode="Inline" /> <Columns> <dx:GridViewCommandColumn VisibleIndex="0"> <EditButton Visible="True"></EditButton> <NewButton Visible="True"></NewButton> <DeleteButton...