asp.net

Accessing info from FK-related tables with LINQ

I am working on an employee-scheduling system. I think I have the database setup pretty well, and have run into a snag on pulling the data for my database and getting it onto the page. I am using LINQ to make things easy on myself. Here is the Object Relational Map. Here is my Linq select statement: protected void LinqSelecting(object...

Format international currencies

I have an asp.net application that we are in the process of "globalizing", I have the currentculture and currentUICultre being set to the appropriate values and currencies are displaying as expected using the format currency ie. FormatCurrency(_nPrice) produces $xxx.xx for en-AU and £xxx.xx for the en-GB, however we need to distingu...

how to refrence Linq2SQL class from a static class

hi, i am having a strange problem, i have a static class like this public static class BlogDataAccess { private static Blog _Blg; public static Blog Blg { get { _Blg = new Blog (); return _Blog ; } } } then in my page i do the following var DataContext= new DataClass...

CMS -WYSIWYG for dummies

So, I’m working on a project for my company that involves allowing users the ability to create their own web pages. So for example the real content managers that know what they are doing make all the mains pages. Then a user can make their own page describing what they do and share items with others. Now the catch is that these users hav...

Is it possible to simulate subdomain on a development machine?

I am trying to set up a subdomain on my website but i am having a hard time getting it to work. Especially since the only way i can test it is by sending all the files needed from my development machine to the hosting server (and sometimes breaking the website). i am using asp.net on an IIS7 servers Is there an easy way to do the settin...

asp.net parameter is not valid when using bitmap

private void LoadButtonImage() { if(buttonPicture != null) buttonPicture.Dispose(); string templateFileName = "PicTemplate/RoundedRectangle.png"; buttonPicture = new Bitmap(templateFileName); } This is my coding ..... parameter is not valid in runtime ... what can i do? Please Give result for this error very urgent...

Asp.net databindings losts after postback

HI everyone, I'm having the following issue that is really driving me crazy. After I perform any sort of postback, several controls do not rebind themselves, for instance DetailsView with an attached ObjectDataSource (in my case ObjectContainerDataSource) LoginView is not showing the LoggedInTemplate but LoginStatus is showing me as lo...

Ad Management for ASP.NET sites

I am looking out for an ad management software that will help me host ads on my website. I have checked out BanManPro but its way too costly. Google Ad manager has issues and the support system is not very active at the moment. Has anyone create an ad management software open source that can be used on ASP.NET sites. I am ready to pur...

textbox allow only letters

Hello I need some help with a textbox. The textbox is only allowed to contain letters. how do I do this ? Greetings! and Thanks in advance ...

ASP.NET MVC: Using LINQ to XML to render (X)HTML

There has been a lot of discussions on View-engines for ASP.NET MVC and some criticisms against the inline "tag-soup" with for-loops and thing like it. The alternative or complement has been to use HTML-helpers, which are just inline method-calls. When I look inside ASP.NET MVC's HTML-helpers today they are using a class called TagBuil...

How To add another constructor with parameter in linq class(Table)

Hi, I am using LINQ to SQL in an ASP.NET project. While inserting the table I need to convert the values to the particular table object and I need to insert. For that I created a new constructor in that table with parameter so that I can assign my value to that table object , the assign the functionality is working but while inserti...

Redirecting URL's

How can I redirect www.mysite.com/picture/12345 to www.mysite.com/picture/some-picture-title/12345? Right now, "/picture/12345" is rewritten on picture.aspx?picid=12345 and same for second form of url (picture/picture-title/12323 to picture.aspx?picid12323) I can't just rewrite first form of url to second because i have to fetch picture ...

System.Web.HttpException: Request timed out

I have problem with "System.Web.HttpException: Request timed out" when i use to get large data. Moreover i have changed in web.config file. Could anyone help me? ...

How to emulate ScriptManager.RegisterStartupScript() in ASP.NET MVC project

I am using ASP.NET MVC project and jQuery to handle async requests. Sometimes for an async request I need an initialization JavaScript snippet to be returned and executed together with an HTML snippet (I want this JavaScript to be rendered on server). For now I am using my own ScriptsHelper class with a RegisterStartupScript() method (a...

How can I insert from multiple tables into one?

I have a table for users (username, password .. etc) and another one for products (product name, price, quantity, username .. etc) I want the username from the first table to be inserted (with the rest of the product info) into the product table when the user put it for sale. How can I do this? I'm using visual web developer 2008 expr...

how to store incoming ProxyURL request into a database using ASP.net

we have a small problem, we are trying to store a institutes proxy URL into a database, we are able to identify the URL correctly but as soon as we try and store that value in a database it only stores the original URL rather than the ProxyURL below is the code for reference protected void checkProxyUrl(string login) { string mainU...

Debugging ASP.NET Timeout

I need to debug an asp.net website following a timeout, i.e. via a breakpoint placed in the .aspx page that is specified as the loginURL setting in forms authentication config. However, I understand that when debug="true" the site will not timeout (link text) So how can I debug timeout scenarios? Thanks. ...

How do I access datasource fields in an ASP.net Repeaters ItemDataBound event?

Hi I have a Repeater control that is being bound to the result of a Linq query. I want to get the value of one of the datasource's fields in the ItemDataBound event, but I'm not sure how to do this. Regards Peter ...

how to find a gridviw intem at button_click i am using following code foreach (GridViewRow dr in gvrejectreq.Rows)

foreach (GridViewRow dr in gvrejectreq.Rows) { DropDownList ddl=(DropDownList)gvrejectreq.Rows[dr.RowIndex].FindControl("DropDownList1"); string status=ddl.SelectedValue; int userid = gvrejectreq.Rows[dr.RowIndex]. } ...

Not allowed to change the 'ConnectionString' property. The connection's current state is open.

Hello there! First time user of stackoverflow, but I have followed its development over on Coding Horror. I am having a massive headache with the above error. I have ELMAH installed and Google Analytics and as the site traffic has increased, so has the number of times I have seen this error. I have done my best to follow the Microsof...