Results 1 to 12 of 12
  1. #1
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    First ASP.Net Site - Need Help
    Ok I been playing around with ASP.Net & MS SQL for a week or so.

    I have created a site that runs on my local workstation. My sites uses a MS SQL Database that is located on "MY HOST".

    I am able to run all pages (Located on my workstation) and View/Edit/Create record on the database located on my HOST Server.

    So what the problem??

    I copy all the files to my host (via FTP) and I get a runtime error on every pages evan a test page I created that does not use my Masterpage and has nothing added to the page at all.

    So I am thinking that the problem is my web.config page??? All I have in that is my connection string & system.web section that sets customErrors to Off

    Or maybe I need to set permissions somewhere that allows a user to my website to access the database???

    Any ASP.Net programers out their???

  2. #2
    Member
    Join Date
    January 5th, 2009
    Posts
    38
    First thing to check:

    The .net framework you are using on your dev box to build your site should match the .net framework version installed on your hosting company server.

  3. #3
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    Perfect !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    I knew that I did it in ASP.net 2.0 and My Host support 1.0 2.0 3.5 etc............

    So I thought I was good, however when I cheched the domain setting for that site, ASPNet version was set to 1.0, I then changed it to ASPNET 2.0 and it works!!!!

    Thank you so much.

  4. #4
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    Ok, So now I got another question at you may be able to help me with. (If Then Else Statment)

    When I go to display the informatin I read from my database I want to us a "If statment" on the value from the record and display text based on what is in the record, so in ASP Clasic I would:

    <%
    if Eval("canada") = "True" Then
    Response.Write("They ship to Canada");
    else
    Response.Write("Sorry but they do not ship to Canada");
    end if
    %>

    I using VB with my asp.net pages. I can not figgure this out but it most be easy.

    Any ideas??

  5. #5
    ABW Ambassador isellstuff's Avatar
    Join Date
    November 9th, 2005
    Location
    Virginia
    Posts
    1,659
    If you are populating via code behind, then you could do it in your code behind. There are quite a few ways to accomplish this, but I like the low level approach

    <span id="myMessage" runat="server"></span>

    then in the codebehind, keeping in mind that I'm a c# guy, but the basic technique is the same:

    if(myString.Equals("canada")) {
    myMessage.InnerHTML = "They Ship to Canada";
    }else {
    myMessage.InnerHTML = "Sorry, but they do not ship to Canada";
    }

    Hope this helps, there are other ways, this is just one of the ones I use.
    Merchants, any data you provide to Google Shopping should also be in your affiliate network datafeed. More data means more sales!

  6. #6
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    Thank you for your reply So I put the code "<span id="myMessage" runat="server"></span>" in my .aspx file wheir I want to print, right? And where do I put my Response.Write statment? I am guessing in my aspx file as well.

    Also Iin your code "if(myString.Equals("canada")) {"

    How do I pass the value in my code Eval("canada") to "mystring" that you use above. canada is set to "True" or "False" in my database.

    As you can see I getting really confused about using the something as easy as the If Statment in asp.net

  7. #7
    ABW Ambassador isellstuff's Avatar
    Join Date
    November 9th, 2005
    Location
    Virginia
    Posts
    1,659
    Quote Originally Posted by kse
    Thank you for your reply So I put the code "<span id="myMessage" runat="server"></span>" in my .aspx file wheir I want to print, right?
    yes

    And where do I put my Response.Write statment? I am guessing in my aspx file as well.
    There wouldn't be a response.write. Setting the InnerHtml will result in the string being rendered on the page.

    Also Iin your code "if(myString.Equals("canada")) {"

    How do I pass the value in my code Eval("canada") to "mystring" that you use above. canada is set to "True" or "False" in my database.

    As you can see I getting really confused about using the something as easy as the If Statment in asp.net
    Yeah, your going to have to do some reading. I was giving a more advanced technique, there is probably a simpler approach that I'm not familiar with. It sounds as though you are building webpages via the Visual Studio UI. This is not something I've ever done.
    Merchants, any data you provide to Google Shopping should also be in your affiliate network datafeed. More data means more sales!

  8. #8
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    Yes I am using Visual Studio and I sure do have alot of reading to do. If I can ask one more question, In the code if(myString.Equals("canada"))

    In my aspx page I would have to set:

    myString = Eval("canada")
    Also what Dim Statment would I have to use for myString???

    Again Thank you for your help so far. If I can get a If statment working I can get my page finished (for now)

  9. #9
    ABW Ambassador isellstuff's Avatar
    Join Date
    November 9th, 2005
    Location
    Virginia
    Posts
    1,659
    Quote Originally Posted by kse
    Yes I am using Visual Studio and I sure do have alot of reading to do. If I can ask one more question, In the code if(myString.Equals("canada"))

    In my aspx page I would have to set:

    myString = Eval("canada")
    Also what Dim Statment would I have to use for myString???

    Again Thank you for your help so far. If I can get a If statment working I can get my page finished (for now)
    I'm going to bow out on this one, I don't think I have a good answer based on my experience.
    Merchants, any data you provide to Google Shopping should also be in your affiliate network datafeed. More data means more sales!

  10. #10
    ABW Ambassador kse's Avatar
    Join Date
    November 29th, 2005
    Posts
    2,511
    You have already given me a good starting point that I will start working on tomorrow (I need a break tonight) so yes you have helped alot

    Thank you.................

  11. #11
    Newbie
    Join Date
    June 2nd, 2010
    Posts
    5
    But I thought ASP as dead already along with java applets. But just correct me if I'm wrong I last coded with it in 2003 but completely forgotten everything So how does the language progress these days? I wish Microsoft will finally let go of it in peace.

  12. #12
    Member dsharpie's Avatar
    Join Date
    September 24th, 2009
    Location
    St. Petersburg, FL, USA
    Posts
    149
    It's good that you've forgotten everything, because ASP.NET is radically different from ASP. A whole new object-oriented world and massive pre-coded framework of classes that you've missed while you've been away!

  13. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Web Developer ASP / ASP.NET and PHP.
    By Murray Newlands in forum Job Postings
    Replies: 0
    Last Post: July 24th, 2007, 05:23 AM
  2. Poll: ASP, ASP.NET or PHP
    By PatrickAllmond in forum Programming / Datafeeds / Tools
    Replies: 9
    Last Post: October 5th, 2005, 09:38 AM
  3. Amazon ECS 4.0 & ASP.NET (VB.NET) QUESTION
    By stfarm45 in forum Programming / Datafeeds / Tools
    Replies: 0
    Last Post: March 2nd, 2005, 10:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •