asp.net

Align radio button with corresponding label

I'm using ASP.NET radio button list control. It generates the following HTML. <table> <tr> <td> <input type="radio"/> <label > label 1</label> </td> <td> <input type="radio" ...

Uploading files past Asp.net request length limit?

I searched SO and found this question, but it's not quite what I'm asking. I'm wondering if a IHttpModule can be created that can inspect the ContentLength of the request, and if so either redirect or somehow throw that request out and create a new one. Specifically, I'm trying to handle image file uploads, but I'd like to have the ...

What are the minimum permissions for connectionUsername when using ActiveDirectoryMembershipProvider

I am writing an ASP.NET application using ActiveDirectoryMembershipProvider, similar to the scenario outlined here: http://channel9.msdn.com/wiki/securitywiki/aspnet2formsauthtoadrolesinadintranet/ As part of this setup, I configured ASP.NET Membership as follows: <membership defaultProvider="MyADMembershipProvider"> <providers> ...

What is going on in this ExecuteDataset method?

OK so I one page I find this line: objDsCourse = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings("connstr").ConnectionString, CommandType.StoredProcedure, "Course_NewReportGet_Get_Sav", objPAra) And I copied it to another page to start modifying it to work there: getData = SqlHelper.ExecuteDataset(ConfigurationManager...

Appending to default title in asp.net masterpage

I am using the MVC to add a title to the masterpage with a content place holder. The default MVC masterpage template uses the following code: <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title><asp:ContentPlaceHolder ID="TitleContent" runat="server"/></title> <link href="../../Content...

How can I create a database on my server from the web?

I have an admin account for my website where I add new clients. When a new client is added, they get an account and their own database. The problem is I can't create new databases on my server from my admin account. When running it locally, I can add a database locally. But, when I try adding to the server running my website off the s...

DotNetNuke ObjectDataSource.SelectMethod not being saved in viewstate

I'm using DotNetNuke 4.9.2 and am running into an odd issue. I have a MultiView in the module that I'm developing, and in one of the views have a GridView that is bound to an ObjectDataSource. In a separate view, i have several buttons that will switch the SelectMethod of the ObjectDataSource in the 2nd view and then set that view ac...

How can I access runat="server" ASP element using javascript?

It seems everyone is doing this (in code posts etc.)...but I dont' know how :( whenever i try to manipulate an asp element using javascript i get a "element is null" or "document is undefined" etc. error..... javascript works fine usually,...but only when i add the runat="server" attribute does the element seem invisible to my javascri...

Reusing session identifier

hello A) I assume Asp.Net allows you to reuse session identifier only if we operate in cookieless mode, but not if we use cookies to store session ID? B) From my book: By default, ASP.NET allows you to reuse a session identifier. For example, if you make a request and your query string contains an expired session, ASP.NET creates ...

How do I reference a DataRow element by name in a DataSet retrieved from SQL?

So I am building some XML using a XmlWriter and a DataSet but when it comes time to loop through each DataRow in the DataSet I can't figure out how do reference like "userid" and such that come back from the stored procedure. In page code I see them doing it as Eval("userid") or whatever which I am using the same stored procedure, but I ...

Bind repeater to DirectoryInfo.GetFiles

Hi If I want to bind the files of a folder to a gridview, I can just do this: GridView1.DataSource = New DirectoryInfo("C:\MyPix").GetFiles GridView1.DataBind() ...And this asp.net <asp:GridView ID="GridView1" runat="server"> <Columns> <asp:BoundField DataField="Name" /> </Columns> </asp:GridView> ...But if I want to bind it t...

How to unit test server controls on postback?

I am trying to create my own EasyBinderDropDown that currently looks like this: public class EasyBinderDropDown : DropDownList, ICanBindToObjectsKeyValuePair { public void BindToProperties<TYPE_TO_BIND_TO>(IEnumerable<TYPE_TO_BIND_TO> bindableEnumerable, Expression<Func<TYPE_TO_BIND_TO, object>> textPro...

Can I Number a GroupTemplate or ItemTemplate?

I would like to use a GroupTemplate to separate a list of items into groups. However, I need each Group to be numbered sequentially so I can link to them and implement some JS paging. I'm binding to an IEnumerable Here's some pseudo code. I would like the output to look like this: <a href="#group1">Go to Group 1<a> <a href="#group2">...

Able to send email through .exe, but not ASP.NET?

I'm trying to send an email to an external address as part of a web app. I can send an email fine when using a simple executable running on the server: private void button1_Click(object sender, EventArgs e) { MailMessage message = new MailMessage(welcomeMessageFrom, toAddress, welcomeMessageSubject, welcomeMessageSubject); ...

Relative links automatically gain the session ID

Hello, Because the session ID is inserted in the current URL, relative links also automatically gain the session ID. In other words, if the user is currently stationed on Page1.aspx and clicks a relative link to Page2.aspx, the relative link includes the current session ID as part of the URL. The only real limitation of cookieless ...

How to send custom HTTP headers with Flex when using Google Chrome

I am using a UrlRequest to send data to a server. I am sending various parameters via custom HTTP headers in the following way: urlRequest.requestHeaders.push(new URLRequestHeader("someheader", "somevalue")); When the request hits my ASP.NET endpoint (a class implementing IHttpHandler), the HttpRequest Headers property doesn't contain...

whats the best asp.net mvc tutorial(s) out there? <EOM>

answer could include blogs, podcast, etc ...

Creating a Facade over Membership Provider

I am using the Membership Provider in ASP.NET MVC and for most data access I use nHibernate and a repository pattern. Do you recommend using a Facade over the Membership Provider so I can create a repository and make it operate a bit more inline with the rest of my entity model? I also have added additional functionality like the ability...

What is best practice to handle javascript and css files

How do You manage all of Your .js and .css files in asp.net project. Especially when they have a lot of dependency between each other? I've combined all script in one. But it's become weighty, and 90% of them were not used on particular pages. What I want is an instrument or guidence to manage all of those scripts, simple dependency ma...

asp.net web.config encryption

why is it considered correct practice to encrypt sensitive data in web.config before deployment? if the website is hosted on-site, how can it be a risk not to encrypt this data? ...