asp.net

Error while clicking linkbutton in MasterPage

Hi guys, I am getting following error. Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. Description: An unhandled exception occurred during the execution of the ...

Sending HTML elements through Mails.

Hi all , I want to open a mail client on click of a link. I am using this code: System.Diagnostics.Process.Start("mailto:email address?subject=[subject text]&body=http://google.com'>here"); its opening the mail client but I am unable to get the link(here).It should come as a link. Is there any way to do it through IsBodyHtml=true? Can ...

ASP.NET TreeView sort

I am accustomed to winform TreeView having a Sorted property which automatically manages nodes sorting. I now have to alphabetically sort an ASP.NET TreeView and I'm surprised I cannot find any similar property or callback method. Is there any way to automatically achieve this operation in ASP.NET or do I have to manually sort and inser...

How to prevent the uploading of Warez. (asp.net, C#)

My company created an application that can send large attachements from one mail recipient to another (because most mailboxes are very limited). But we were wondering how we can prevent the uploading of warez? For now all extentions are allowed, but we could restrict the extentions to zip and images. But if you zip warez you can still ...

jQuery Validation With Masterpage in asp.net

i have a childpage.aspx in masterpage and i am trying to validate required field in childpage through masterpage, the following code i have write in masterpage to validate $(document).ready(function() { var container = $('#sam586'); $("#aspnetForm").validate( { e...

Treeview inside DropDown in ASP.NET

I have a hierarchial data ( like Geography --> Area-> Country -> State ) which need to be shown in a Treeview. This was done but the problem is it is occupying toooo much space on the web page. So i thought of using a drop down that would hold a treeview ??? Got few samples from CodeProject with No success. Any pointers or any other s...

Hiding ASP.NET SiteMap nodes in TreeView control

I have a SiteMap with All my nodes. I'm using a TreeView control which is linked to the SiteMap for navigation. Now I would like to hide certain nodes from appearing on the TreeView. Is it possible to do this? ...

Replicate VS2008 "Publish Web Site" from command line

...

Page Refresh in ASP.NET

save dialog saves file to the local machine. But after that, my page stand there and do nothing for the rest of my process. I use below code to open a save dialog protected void lnkbtnDownload_Click(object sender, EventArgs e) { string fileName = startupPath + "bin\\Inbox.mdb"; System.IO.FileInfo targetFile = new System.IO.FileInfo(...

Web.Config issue

Hi, i have a two webservers, REMOTE and LOCAL. I have multiple projects of which some are hosted on REMOTE, some on LOCAL and some on both. I have a problem configuring the following situation: http://REMOTE/ << contains 'main project' http://REMOTE/doubleproject/ << contains 'doubleproject' http://LOCAL/ ...

Opening an image in vb to send into a database - Asp.Net

I'm currently patching an asp.net program where I need to be able to send an image to an SQL Server 2005 DB. It works fine when I use the asp:fileupload control, but the trick is that when the user deletes the image, I'm supposed to replace it with an image from the server saying "empty", in code-behind. I know how to open, use and save...

How to open another window

Hi , how can i open a page in new window in using javascript. ...

Adding javascript to a link's OnClientClick property while binding a repeater

Hi, I'm trying to get this working but no success: <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="btnDeleteFamily_Click"> <HeaderTemplate> <table> <tr> <th width="90" valign="top"><%=getTag("name")%></th> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td><%#Eval("chrname")%></td> ...

Is there a way to draw lines (x,y)-(x2,y2) in ASP.NET pages?

Not animated of course, but good for displaying data visually such as Gantt chart etc. ...

assigning a serial number to a client from a pool of serial numbers

Hello, I have a sql server table of licence keys/serial numbers. Table structure is something like; [ RecordId int, LicenceKey string, Status int (available, locked, used, expired etc.) AssignedTo int (customerId) .... ] Through my ASP.NET application, when the user decides to buy a licence clicking the accept button, i need to reserv...

Declaring an nvarchar in VB/Matching an nvarchar in a SQL query

I'm working on an ASP.NET application that uses VB. I'm using a SQLReader/SQLCommand/SQLConnection within the VB file to try to pull data values. I was mystified to find out that the reason why the query wasn't returning any values, and someone here showed me how to troubleshoot the query to verify things were being returned, which they...

asp.net converting iso-8859 file to utf-8

Hi, I need to convert a CSV file from iso to UTF-8 to keep the accents in the database. French accents (é,è,ê, and the like) are not kept when I try to translate them to UTF-8, they are changed to "?". I'm stumped. I use the following function for the translation: public static string iso8859ToUnicode(string src) { Encoding...

ASP.NET MVC - Is IsPostBack still here?

I know, I know, I know. I shouldn't be doing webforms inside of MVC, I completely agree. But, the people who sign my paycheck will not approve a complete conversion of our site to MVC right now. So I am taking incremental steps, page by page, to convert them over while adding new features in MVC. So my question is how can I access th...

How can I add data scaffolding to an existing ASP.NET website?

I've added in the Dynamic Data stuff to our existing website, and gotten that working as far as adding a DynamicDataManager to a page and setting a GridView to use it. However I think I'd like to get the full scaffolding functionality up and running so I don't have to write all the layouts for all the tables. Unfortunately I can't get ...

ASP.NET Deployment

I have developed an ASP.NET Website in Visual Studio 2008. Now I want to deploy that in some other machine. How can I do that?? Like we make an installation package for Windows application what can we do for ASP.NET Websites? ...