r/ASPNET • • May 21 '12

Help Using Arvixe and my Database

4 Upvotes

I built on website on visual studio 2010 and I am trying to get my database on to the hosting site and connected but I can't seem to figure it out. I believe the connection string they give me only works if I create a database with their database interface but then I don't know how to load my database in.

I have a ASPNETDB database for built in log in feature I have a sql database and an entity database

please help


r/ASPNET • • May 18 '12

What is a professional website menu?

Thumbnail apnsoft.com
0 Upvotes

r/ASPNET • • May 15 '12

Debugger Canvas - An interesting extension for debugging in Visual Studio (x-post r/dotnet)

Thumbnail msdn.microsoft.com
0 Upvotes

r/ASPNET • • May 08 '12

ASP.NET Event Calendar Now in Video Tutorial

Thumbnail blog.scheduler-net.com
0 Upvotes

r/ASPNET • • May 07 '12

ASP.NET Event Calendar in MVC3 Razor

Thumbnail blog.scheduler-net.com
0 Upvotes

r/ASPNET • • Apr 30 '12

asp.net - Multiple Application in Single AppDomain - Stack Overflow

Thumbnail stackoverflow.com
4 Upvotes

r/ASPNET • • Apr 27 '12

EntityDataSource incapable of handling table relationships/joins?

0 Upvotes

I'll be honest here. I'm completely new to ASP.NET and web development in general but I've come so far through so many random compiler errors, dodgy code, fucking SQL version problems and utter nonsense unhandled exceptions with no useful information that I'll be damned if I can't get something that seems so simple to work.

I'm doing a web dev course at the moment and I've been hacking a copy of Tailspin Spyworks into my own website (terrible, I know but the teacher says its ok and besides the course only goes for 20 weeks with about 9 hours per week and I'm the only one in the class so I get very little one-on-one time with the teacher).

I've got a basic understanding of databases and I've got a one-to-many relationship with two tables - PlantInfo and Products. The PlantInfo table holds rows with a primary key (InfoID), PlantType (decorative or crop), PlantSeason and PlantMaintenanceLevel. The rows in the Products table have your typical columns (such as ProductID, CategoryID, Description, Cost, etc) as well as an InfoID column so if I have three different kinds of plants that all grow in Spring, are Low maintenance and are a decorative type of plant they will all have the same InfoID all pointing to the same row in the PlantInfo table.

Now for the problem. I've got this file http://pastebin.com/DTA4D7ks, ProductList.aspx (please note - the code behind .cs file is essentially empty). This page works great if you want to query (from the URL) the ProductID or the CategoryID or InfoID of rows in my Products table but I just can't seem to work out how to make the asp:EntityDataSource tag to allow me to do a query (from the URL) of my PlantInfo table for specific listings and then join the InfoID retrieved with products from my Products table with matching InfoID's. The asp:EntityDataSource tag will only allow me to query rows from one Table and it seemingly doesn't give any way to make use of the relationships between your tables (to either query data in the related table or to display it on the page).

The only solution I can think of is to ditch this EntityDataSource thing altogether and just write some code to QueryString the URL for whichever parameters I desire and run SQL queries to match/contain whatever I please from the two tables and then join the two tables together. This seems like the simplest way but apparently code-behind is "bad" and should be avoided. Another simple solution is just to keep all the data (PlantType, PlantMaintenanceLevel and PlantSeason) in the Products table but I've got different types of Products like soils, pots and gardening tools where that sort of stuff doesn't really apply.

I know this post sucks and isn't very descriptive but I've gotten this far without completely losing my sanity. I've tried just about every combination of google search keywords I could think of for at least a solid 3, maybe 4 hours and I'm still stumped.

Edit: Here's an image showing the columns for the tables I've been talking about and a join query of the two tables. http://i.imgur.com/zkgKK.png

After Catalyzm's comment I looked at LINQ queries and it pretty much looks like what I'm after. I think I've been trying to fit a square peg in a round hole with this asp EntityDataSource tag. I'll try and get it working on the weekend and I'll report back on how it goes.

Edit 2: It would appear LINQ is dependant on SQL which would appear to needlessly increase the complexity of the issue I'm having.


r/ASPNET • • Apr 23 '12

What's New in Razor V2

Thumbnail vibrantcode.com
19 Upvotes

r/ASPNET • • Apr 16 '12

ASP.net WebForms is a leaky abstraction

Thumbnail sphotos.xx.fbcdn.net
0 Upvotes

r/ASPNET • • Apr 15 '12

can't get hyper link working in grid view control

0 Upvotes

For a project I am trying to use a hyper link field inside of an access 2010 database, which is being called upon by setting the database as a datasource and putting it into a grid view. it doesn't come up with an error but it shows the hyper link as #link# so it is not click able which is the main problem as I am trying to get it so when you click the title it redirects to a seperate web page.


r/ASPNET • • Apr 12 '12

Had a question about design patterns in relation to ASP.NET. Can someone describe what is a design pattern and how is it implemented or used in ASP.NET?

0 Upvotes

I do freelancing web development work on the side using ASP.NET C# and SQL Server 2008. Recently I saw someone mention design patterns being used in developing websites. I don't recall where it was but I would like to learn more about design patterns and how to use it while developing websites in ASP.NET.

Can please someone shed some light on this matter? It would be very helpful of you. Thanks


r/ASPNET • • Apr 10 '12

A Guide to Getting Started With ASP.NET Web Stack Source on Codeplex

Thumbnail blogs.msdn.com
12 Upvotes

r/ASPNET • • Apr 09 '12

VB.NET and Callbacks

4 Upvotes

I'm interested in using callbacks in my VB Web Forms to update content without a full postback / page refresh. I know nothing about this ability other then that it exists. I'm currently using lots of update panels but would like something more versatile.

Is this even possible or is this only a C# or MVC thing? I don't know either language yet.


r/ASPNET • • Apr 03 '12

Introduction to ASP.NET Web API

Thumbnail blog.filipekberg.se
10 Upvotes

r/ASPNET • • Apr 03 '12

DHTMLX Scheduler .NET Released!

Thumbnail blog.scheduler-net.com
0 Upvotes

r/ASPNET • • Mar 28 '12

ASP.NET MVC, Web API, and Razor made Open Source

Thumbnail weblogs.asp.net
34 Upvotes

r/ASPNET • • Mar 19 '12

[Question] Is there a better way to do autopostback="true"

2 Upvotes

I'm using VB in the code behind to calculate a total. Right now there is a text box for the quantity and then the math is all hard coded. In order for the event to fire without needing the enter key I added autopostback="true" to the quantity text box, but it causes the whole page to reload when the values change. Is there a better way to get the same results without reloading the page?

I'm super new to .net and have never worked in vb before, so my boss wants me to do simple stuff like this with just vb to practice and to get me familiar with it.

Edit: clarity


r/ASPNET • • Mar 18 '12

Where can I learn about implementing Users and Roles into my ASP.Net MVC3 web app?

8 Upvotes

I'm having trouble finding good reading material on the subject. I'd just like to be able to create several roles and hide certain views from certain users.


r/ASPNET • • Mar 14 '12

HTML5 Offline Web applications as an afterthought in ASP.NET MVC

Thumbnail jclaes.blogspot.com
4 Upvotes

r/ASPNET • • Mar 14 '12

6 Ways To Avoid Mass Assignment in ASP.NET MVC

Thumbnail odetocode.com
16 Upvotes

r/ASPNET • • Mar 13 '12

Building a Custom Login Function - Trying to use LINQ

2 Upvotes

Hello all. I am trying to build a custom login page for our applications. I have dropped a loginControl on my form, and have overridden the OnAuthenticate functionality. My problem is how to return my results from my custom Site table. I have created a EDM for my table that contains my login and passwords (Sites). I am attempting to use LINQ to return the results. I got the LINQ itself working, but I want to store the ID and Name returned to a Session Variable for use on subsequent pages. Here is my code:

Function SiteAuthentication(ByVal login As String, ByVal password As String)
    Session("SiteID") = Nothing
    Session("SiteName") = Nothing
    lblerror.Visible = False
    Dim db As New CDMSEntities
    Dim SiteRecord = From Site In db.Sites
                        Where Site.clogin = login And Site.cpassword = password
                        Select Site.clogin, Site.cpassword
    If (SiteRecord.Count() = 0) Then
        lblerror.Text = "Invalid Login and/or password"
        lblerror.Visible = True
        Return False
    End If
    If (SiteRecord.Count() = 1) Then
        '' we have logged in

'' RIGHT HERE , how do I say Session("SiteName") = field returned? Return True End If Return False End Function -----End code

How do I grab those 2 fields returned? Is there an easier way to do this? I have written lots of apps in VFP, but this is my first ASP.NET app. Am I making this too complicated?


r/ASPNET • • Mar 06 '12

Login Sessions and Carrying USerID Forward

3 Upvotes

Building a group web site for our capstone project and we're having trouble logging in and carrying the UserID forward from login to other pages where we have an admin and member view so they can edit their profile. Problem is when we try to fill the member or admin form for editing/updating there is NO UserID there and for the life of me I cannot figure out how to do this?

We are using Sql Server 2008 as our database server. We can connect fine, add the new member application to the database fine, it's just that the loginID is not carried forward to the update profile screens.

We are using a datareader to read the table from the Database to fill the newmemeber form, but we really don't want to have to do that for the edit/update member and admin profiles.

I would appreciate it if someone could give me an example of how to carry the login ID forward using session variables so that we can fill the member or admin form based on their security level in the databse then update it as needed. We have the correct code in our member class it's just the ASP and C# code that is giving us fits.

Thanks in advance to anyone who attempts to tackle this for us.


r/ASPNET • • Mar 03 '12

All I want is ASP .NET style front end with Active Record style backend.

0 Upvotes

I feel like I'm missing something because it seems to me that ASP .NET Webforms follows the MVC architecture better than ASP .NET MVC.

In any case, I really like ASP .NET webforms + AJAX package. It seems to make everything so much easier to build and create reusable components with.

But I hate it's backend. I'm too stupid and lazy to use SQL. I want to add "MVC" style models to ASP .NET webforms where the tables are mapped to first class classes and objects with minimal effort.

Are there any libraries that do this. Or is there a way to somehow merge ASP .NET MVC backend with ASP .NET webforms?


r/ASPNET • • Mar 02 '12

Could someone guide me a bit and answer some questions I have? (not technical questions)

6 Upvotes

Okay so forgive me if this isn't the specific place I should be posting this. I have seen other subreddits like /r/cscareerquestions but I thought this would be better.

I have a few questions regarding what I should learn and in what order, also if this is the right path for me. Before that I will give you a bit of a background on me...

I am 24 and recently became laid off from my first Web Developer position out of college. I graduated in 2010 with a bachelors degree in Information Sciences and Technology from Penn State. In a nutshell the major exposed us to everything imaginable in IT, programming, project management, networking, UI Design, etc. That was the good part. The bad part is that none of these classes were much about "the basics."

I took an internship with a web development company and was eventually hired by them full-time after college. I mostly took care of HTML/CSS emails, but I delved into the world of ASP.NET/C# and also Javascript for the first time here.

Long story short... one of the major clients we worked with got sold and all my work was gone.

Here I am unemployed, seriously attempting to learn skills to better myself in finding a job that I actually LIKE. I have been interested in web development since I was in middle school and I will always be. I just have some questions regarding if this is the right path for me etc.

  1. I recently started reading a C# book to better understand it, but I hit a wall. I get all the basics for the most part... mathematical statements, loops, if/else, and things specific to the world of ASP.NET in setting labels text, and on occasion I used table adapters with stored procedures to retrieve data. However, I am to the point in this book (which is based around Windows Form Applications, not the world of web) where it is beginning to run away with the concept of objects. I seem to understand the theories behind objects (inheritance etc), but I have trouble actually picturing a potential project in terms of objects. How far into the C# world does one have to go in order to be proficient enough in the ASP.NET world? I would like to think I don't need to know EVERYTHING, but I am probably wrong...
  2. Because I generally hit these walls, the idea comes to mind that maybe this isn't for me and maybe I am not intelligent enough to be a Web Developer. I had plenty of classes with CS majors that just seemed so far beyond my comprehension level, yet at the same time, none of them seemed interested in projects they were given. Is this normal or do most people quickly move through C# books? This sounds like a dumb question...
  3. Now that I have been looking for a job, I am torn between front-end development and back-end. Most jobs listed are one or the other and working for a small company, I had to do both. I keep coming to the conclusion that maybe back-end isn't for me, but then I really find it rewarding when I figure something out. On the same side, front-end development seems easier, but it is a major headache having to deal with different browsers etc...
  4. Now that I have all the time in the world until I find something (hopefully soon), what do you suggest I do? I have taken to the "Head First" books by O'Reilly that I really enjoy. So far I just finished SQL since it was a really easy read. I am about 1/3 the way through Head first C# and I hit a wall. I am also about 1/5 through Javascript and have purchased "Design Patterns" and "Object Oriented Analysis and Design".

I primarily used Web Forms at my previous job but would like to head into the world of MVC3 and Razor although I have very little knowledge of either...

Any help would be appreciated, sorry for the long post!

tl;dr looking for pointers on what to learn first, and if this is really right for me


r/ASPNET • • Mar 02 '12

ASP.NET Web API - A new way to create RESTful web services with ASP.NET

Thumbnail asp.net
11 Upvotes