asp.net

How it is possible to reach a variable from a different code-block expression than the block where the variable was declared ?

Hi, Can someone explain the working principle of asp.Net below? I have 2 separate code-block asp.Net expressions in an aspx markup, with an html content between (span element in the example below). In the first code-block, there is "i" as an increment variable for the for loop. Then the code-block is cut with an html content. And a...

cURL upload file to asp.net site ?

In linux machine,Using cURL, I'm trying to upload a text file to a asp.net site. I'm new to cURL. My Source code... Upload.aspx <%@ Page Language="C#" AutoEventWireUp="false" CodeFile="Upload.aspx.cs" Inherits="Upload" EnableViewStateMac="false" EnableSessionState="false" EnableViewState="false" %> <html> <head> </head> <body>...

Where to store encryption key

I am encrypting data (health care industry) using the aes encryption classes in the .net framework. What are some of the recommended locations for safely storing the key? I have it in the web.config for development, but that does not feel production worthy, to say the least. ...

Using PDF In .Net App

Can someone point me to some code/tutorial on how to upload pdf files and store them, then moreover how to use a pdf reader to display the file as read only in an asp.net application. Is there a PDF reader already in the visual studio toolbox? ...

coderush templates for MVC

Am in the process of creating my own set of coderush templates for MVC both on the HTML side and in the code-behind. Am wondering if anyone has gone through the same process and has put them anywhere on the public domain where I could obtain them rather than "reinventing the wheel"? Otherwise will put together a list of the templates my...

Completed tutorials about ASP.NET

Hello. The best way to learn something is to build something with it. Advise tutorials, but not just explain syntax or classes. Need completed tutorials. For example, step by step write your own blog or store. Example, series ScottGu's The more the better. It's maybe MVC too. Thanks. ...

Style for nested gridview asp.net

Hi I have am using nested GridView to show Customers in the mainGrid View and CustomerDetails in the Inner GridView. for the outer GridView there is a CellPadding set of 4px. Now when i use nested gridview, I do not want the Pading to be apllied for the cell containing the InnerGridView. Please help me with this. I am stuck on this issue...

How to create thead and tbody in ASP.NET Table ?

How to create thead and tbody in ASP.NET Table ? I need those tags because of jquery and asp.net gives me only tr, th and td. ...

javascript window.event coming up null ?

I am using a CustomValidator in ASP.NET as follows: <asp:CustomValidator ID="cvComment" ControlToValidate="txtComment" Display="None" EnableClientScript="true" ClientValidationFunction="validateComment" runat="server" ></asp:CustomValidator> And this is the function that gets called: function validateComment(source, args)...

Row doesnot exists in DB- Exception

We have a dataset dsActualCost which fetches query value: MonthName in one column and Cost in another. We have a code to display data in table format. For MonthIndex = 0 To dsMonth.Tables(0).Rows.Count - 1 Dim tdMonthlycost As New TableCell If dsActualCost.Tables(0).Rows.Count > 0 Then If IsDBNull(dsActualCost.Tables(0).Rows...

ASP.Net RegularExpressionValidator fires if string contains \n or is longer than 250 chars

What is the regular expression for a RegularExpressionValidator so it fires if the string in the validated control contains a \n, \t or is longer then 250 chars? ...

ASP.NET control for displaying single items?

When designing an ASP.NET user control my standard way for creating say a details view would be to create a property of the desired type on my page and would set the property in the page load based on the supplied query parameter. I feel I'm probably doing more work then necessary. If I could encase my view inside a container then I co...

Query Active Directory from ASP.NET and bind result to List View

I managed to do ASP.NET authentication work wih AD. Now, I want to query an OU in AD and display the result either ListView or GridView in ASP.NET page. Here's the Domain Controller: dc.itlab.edu The OU: UsersStudents In the organizational unit (OU) UsersStudents there are following columns: First Name, Last Name, Pre-Window...

Accessing Files On A Hosted Asp.Net Site

I want to create an asp.net based website. When I create the sit eon my local machine I am uploading pdf files to my file system then accessing the files to view in my website. When I make the site go live how do I translatye this? Can I have files saved somehow with my interenet host? How would I access the files though the internet hos...

Telerik RadControl Grid: Scroll bug in IE & Chrome

Hello, Im using the Grid control from Telerik's RadControls. The grid is populated with thousands of records and lists 50 records per page. I have some filtering options appearing above and the solution is in ASP.NET 3.5 with NHibernate 2.1. Everything works fine and dandy except for when i select one of the bottom rows and some weird ...

ASPX page response syntax

In the past I have always worked from the code behind page in ASP.NET and emitting all of my markup from that area. I am now learning MVC and am working in the .ASPX page directly. The following statements can be written... <%= Html.Label("Test") %> <%: Html.Label("Test")%> <% Html.Label("Test"); %> The first two emit the word 'Test...

Retrieving Local Resource Values correctly: GetGlobalResourceObject or .NET Control?

Hey guys, While developing I've seen a couple different ways to get local resources values from the resx files. Which one is considered the best practice? Using the GetGlobalResourceObject method: <a id="myLink" href="#"><%= GetGlobalResourceObject("Filter","Diary")%></a> Or using a control and setting the value directly in the resx...

Handling exceptions from a json request with ELMAH

Hi I am using ELMAH to handle expception in my MVC project. All is working fine, except for when the request is an ajax request. The exception is captured and logged but when I do a response.redirect to the error page, the redirect doesn't happen and the error message is displayed on the same page, overlapping the existing content. He...

Telerik MVC Grid : Putting a button in a column

What im trying to do is have an edit button that instead of opening the line for editing, it forwards you to a page where you can edit. Is this possible? I tried something with the client template, but the grid render is ignoring it completely. ...

Is there a way to position caret at end of text in asp.net using a FreeTextBox?

Using FreeTextBox in asp.net (vb codebehind). When the user selects from a list of responses, the response inserts into the ftb but the caret/cursor positions itself in front of the text that is inserted. The user has to click after the text every time. Is there a way to keep the cursor positioned after every text that's inserted? ...