asp.net

Publishing single Form form a group of Forms

In my ASP.NET(2.0),VB.NET Project,around 40+ Web Forms are there.The website is published to http://xxx.sg1.ihub.com/ Around 150 people are using this site inside the company From these 40 Forms ,Can I to publish one Form (Visitor.aspx) to another site http://yyyy.zzzz.com.sg to make that form to be viewed by Public (internet users) ? ...

Performance comparisons of Frameworks to Use for an Auction Web Site

I am a Java guy and therefore would prefer a Java based framework for an auction site that I am planning to develop from scratch. But all my colleagues and friends have pointed out to me that the better sites that are coming up now-a-days are mostly written either using Ruby on Rails, Django or ASP.net MVC framework. I was wondering ...

How do I implement the Post/Redirect/Get pattern in asp.net WebForms?

So I understand the basics of the prg pattern. But I haven't come across a technique for making arbitrary data available to the "get" instance of a page. For example, I might want to display different feedback messages to the user depending on their action which initiated the PostBack. What I've been doing is sending an identifier as ...

Validation and Linq

Hello, I am trying to add validation logic into my application. I have tried to follow this tutorial http://www.a2zdotnet.com/View.aspx?id=75 but I do not have any partial void OnEmailIdChanging(string value) or any "changing" functions. in my class, so I get an error from Visual Studio. It seems that VS did not generate enough code wh...

Is it possible to bind more than one column to a DropDownList's DataTextField?

The following is my code... DropDownList2.DataSource = td.DataSet DropDownList2.DataSource = td DropDownList2.DataTextField = td.Columns("Name").ColumnName.ToString DropDownList2.DataValueField = td.Columns("VendorCode").ColumnName.ToString DropDownList2.DataBind() Now I have a requirement to show the type of vendor and the Name of the...

How would you use a DVCS (mercurial in my case) to develop for different versions of the .NET framework?

I'm writing some sort of new adminstration dashboard for our cms (which runs on asp.net webforms). Some of our older servers can only handle .NET 2.0 for various reasons so I'd have to rewrite my code which uses lambda expressions etc. for that. I wonder how you would use a dvcs like mercurial to develop those two versions concurrently....

Is there conditional caching in ASP.NET?

Is there a built-in asp.net way to conditionally serve pages, for example I want the following logic: If there is a session data I generate a page, if there is no session data I serve the cached page. I am only interested in knowing about a built-in asp.net mechanism for this. If it does not exist I am probably going to simply ...

running 2 websites with mono

I have 2 websites : myDomain1.com & myDomain2.com Both run on the same apache server with Mono. However my issue is that i cannot get them working at the same time. When i go to myDomain2.com it shows the aspx content of myDomain1.com. Occassiononly this is inversed. So that myDomain1.com shows the content for myDomain2.com. I think th...

asp.net make button show different view of MultiView AND download a file.

I have a page on my site on which users have to fill out details before they can download a document. The user details section is on the first view in a MultiView control. After filling out their details I'd like the user to click a button which will show them a file download prompt (I've done this successfully with an ashx handler) th...

Send SQL Report in E mail attachment using C# and ASP.NET

I am trying to send report from sql reportserver 2008 as e mail attachment using ASP.NET and C#, Till now I learned how to Get report as PDF in my code , Now I wanna combine line of codes like byte[] bytes = rview.ServerReport.Render(format, deviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings); Response.O...

Transparent PNG not working in SQL Server Image field

Hi I have tried uploading a transparent PNG image to a SQL server image field, and retrieving it using the DynamicData ImageHandler. The Transparent areas in the image appear white upon rendering. Please advise about any solutions ...

Label ItemTemplate inside Gridview

I want to display only 100 characters at Gridviews ItemTemplate. When I click edit button I want to display all binded value with EditItemTemplate. <ItemTemplate> <asp:Label ID="Label2" runat="server" Text='<%# Bind("Address") %>'> </asp:Label> </ItemTemplate> How can I limit label text 100 characters ? ...

How do I get SelectedValue to bother returning the actual selected value

I'm using the following chunks of code to populate a drop down box on page load from content in an xml file... foreach (System.Xml.XmlNode item in root.SelectNodes(@"/markers/marker")) { string tmpValue = item.Attributes["location"].Value + "#" + item.Attributes["lat"].Value + "#" + item.Attributes["lng"].Val...

NHibernate proxy causing problems with databinding

I have a gridview that is bound to the result from an nhibernate query. If the first item in the list is edited the following exception is thrown: System.Reflection.TargetException: Object does not match target type It appears that the problem is caused by the fact that databinding can't deal with the first item in the list being a sub...

VbScript ASP: checking checkbox

I have a html page with a form that has some check boxes. I need, using VbScript ASP, to make sure that one checkbox is checked. How do I do that? Here's the checkbox itself: Dim terms terms = Request.Form("terms") ...

How to not use ASP.Net Membership Security Question and Answer for custom password recovery?

Hi, I don't want to have the security question and answer feature that ASP.Net Membership Provider gives, but I DO want to enable a lost/forgotten password page. This page would be where a user would enter his/her email address and an email would be sent to that address if the user was registered for them to reset their password via a l...

Is setting CultureInfo in a intranet, ASP.NET, single server app a waste of time?

I'm looking at 1000s of code setting the CultureInfo for ToString and number conversions and date usages. The application is only used on one server, in one town, by one monolingual office and isn't going to move to another country ever. I think these got there from following misplaced FxCop advice about internationalization. Is there...

How Do I pass Values into an imagebutton click event in c#?

Hi, Trying to pass some values into an imagebutton click event, something like this: <asp:ImageButton id="imagebutton1" runat="server" AlternateText="5 Star Luxury Villas in North Cyprus" ImageUrl="/download/1/luxury_villas.jpg" OnClick="ImageButton_Click('value1', 'value2')"/> then in code behind: protected void ImageButton_Cli...

Showing/Hiding div

I am using asp.net ajax control toolkit 1.0 on vs 2005. I am using the collapseablePanel and AlwaysVisibleControlExtender control. When I use these, I notice that it my panel flashes for a few seconds before it is hidden. To avoid this, I have decided to place it in a div to make it hidden. I want it shown when I use the control. Her...

Sending Email via IIS SMTP to external address

Hi, When using the following code to send an email message to an external e-mail address via IIS6 SMTP I am receiving a message stating that the message has been sent, but it never arrives at the destination. I'm using the System.Net.Mail namespace and the following code: MailMessage msg = new MailMessage(); msg.From = new MailAddress...