.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Total beginner question...sorry

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :ASP.Net

Just started programming with ASP.net about a week ago.....  I'm trying to figure out why this isn't working....

I'm trying to retireve an image URL from a database.  They are saved as strings in the table (i.e. 20.jpg, 21.jpg, etc.).  When I have the images saved in the root folder, I can access them just fine with the following ItemTemplate repeater line....

<img src="<%#Eval("piclink")%>" />

Obviously, I don't want to have a whole mash of JPEG files sitting in my root directory.  I suppose I could just use an absolute path, but how would I go about using a relative one?  I tried this...

<img src="</pictures/%#Eval("piclink")%>" />   

And this....   

<img src="<../pictures/%#Eval("piclink")%>" />

And still get nothing.


View Complete Post

More Related Resource Links

Total newbie question: Calling jQuery in an UpdatePanel?



Please forgive this ignorant question - I've used ASP.NET AJAX a good deal but I'm new to jQuery.  Specifically, is it possible to call or create jQuery events on the fly via an UpdatePanel?  For example, calling a jQuery modal or animating a Label (or <div> contained Literal), etc.

If anyone has any advice or could point me to some easy tutorials on mixing ASP.NET AJAX and jQuery, I'd greatly appreciate it. 



I need a workflow triggered by a workflow...how do I design this? Beginner question

I've added the Approval workflow to a forms library and it generates the necessary tasks and emails for 2 levels (serial) of Approval on the form. When the form has been approved the 2nd time, I want it to trigger another workflow that notifies a 3rd person of the existence of the form and assigns her a separate non-approval task. I'm creating it in SharePoint Designer, and I can do most of it, but I'm not sure what field I'm looking for, at the beginning in order to start the workflow. Currently, there is no column for Approval Status in the form library, only a column that shows the status of the workflow (In Progress or Approved).  I tried If Workflow Status equals Approved then email.... but that didn't work. Any help is greatly appreciated.  I'm looking for the data source field and the list item field and value, I guess.  

Beginner question about eliminating Dups

I looked at a couple of links about eliminating dups. One  link suggested RowNUmber() function which is fine for 2005 (but I wanted something that would also work on 2000).  Another link was a MS article advising to select the dups into a temporary table. http://support.microsoft.com/kb/139444/en-us I found this article confusing, and I don't see why it suggests we need a holding table. So I propose this approach - is there any reason NOT to do it my way? (Is there a bug here I'm overlooking?) IF EXISTS(SELECT 1 FROM sys.tables WHERE NAME = 'Facilities' ) DROP Table dbo.Facilities; CREATE TABLE [dbo].[Facilities] ( [ID] int IDENTITY, [FacNo] varChar(3) , [theState] varchar(2) ) INSERT INTO Facilities ([FacNo], theState)VALUES ('1', 'FL') INSERT INTO Facilities ([FacNo], theState)VALUES ('7', 'FL') INSERT INTO Facilities ([FacNo], theState)VALUES ('25', 'FL') --- DUPLICATE THE FIRST THREE ROWS INSERT INTO Facilities ([FacNo], theState)VALUES ('1', 'FL') INSERT INTO Facilities ([FacNo], theState)VALUES ('7', 'FL') INSERT INTO Facilities ([FacNo], theState)VALUES ('25', 'FL') -- ADD some new rows. INSERT INTO Facilities ([FacNo], theState)VALUES ('4', 'VA' ) INSERT INTO Facilities ([FacNo], theState)VALUES ('5', 'VA' ) INSERT INTO Facilities ([FacNo], theState)VALUES ('10','Va') INSERT INTO

running total question

I've NET_SALES Table. it's very large table.   I'm selecting couple of fields to cmplete my task.   I need to rank all invoice total by customer for every sales rep.   So sales rep ABC will have 50 custoemrs. and 1 sales rep can sell more than 1 time to 1 customer. so for ABC, MonthToDate_Rank for custoemr AAA will be 1 and total will be 1000$                  MonthToDate_Rank for custoemr AAB will be 2 and total will be 900$  For Rep ABC1 MonthToDate_Rank for custoemr DEF will be 1 and total will be 1000$                  MonthToDate_Rank for custoemr DEG will be 2 and total will be 900$   I can do it with using ROW_NUMBER() OVER(partition by rep_name order by sum(total_sale) and I've where condition which will select values only for current month. I also calculate the same with QuarterToDate_Rank, YearToDate_Rank. but all are in different rows.   Now, there is new requirement that I've to calclate everything in 1 row. So ABC rep will have customer AAA with MTD_Rank =1 , QTD_Rank = 24 , YTD_Rank = 1000   I've to calcualate everything together. Any ideas?

Beginner question: Passing the output of one Activity to the Input of another


Hi, I am brand new to WF so forgive what might be a simple question.

I am creating multiple activities which will execute in a sequence and pass data down the chain.  I know that one way to do this is to set a context variable in the parent Sequence from Activity A, and then read this value in Activity B (thus the output of A is effectively the input of B).

I'm fine using this technique, but if there is a way to directly declare that the input of Activity B should be the output of Activity A, I'd prefer this.  I'm intrigued by this comment in the new Activity template:

        // If your activity returns a value, derive from CodeActivity<TResult>
        // and return the value from the Execute method.

What is the point of returning a value from an Activity?  Can this return value be read somehow by the next Activity in the sequence?  I'd like to set the input of Activity B to the return value (output) of Activity A.  How would I do this?


Mike Vargas

Beginner question: get selected value of Html.DropDownList


Hi everyone, how are you doing!

I'm just started learning MVC 2. I went through the music store example (though I don't 100% get everything). Now I want to add some functions to the page to learn more. I added paging, and now I want to add search combo boxes (drop down lists). Basically, in the album list screen, I want to add 1 drop down list of genre. If user select 1 genre then click Search, the page should show all album of that genre only.

My problem is I don't know how to get the selected value of this drop down list. The approach I am using now is to get the selected value, then put it as parameter and redirect to Index (/StoreManager/Index?searchGerneId=x). I searched through many posts but couldn't find a solution that works for me. It is probably because I don't really get MVC yet and still try to do things the code-behind way. So please help me :) My code  for Index in Controller is below

public ActionResult Index(int pageNumber = 1, int searchGenreId = -1)
            var albums = from album in storeDB.Albums
                         join genre in storeDB.Genres on album.GenreId equals genre.GenreId
                         join artist in storeDB.Artists on album.ArtistId equals artist.ArtistId
                         orderby album.Title
                         select al

SSAS Beginner Question

As the title states, I am new to SSAS. My question is related to my cube design which I think is incorrect. I have 3 tables, Invoices, invoice details and journal postings. Invoices holds the invoice number, invoice details is related to invoices by invoice number and holds the amount billed. Journal is also related to invoices by invoice number and holds the post date. when I browse my cube I select invoices.invoice number as rows and amt billed as columns. unfortunately, it is showing my the full sum for every row regardless of invoice number. Any ideas?

Beginner MDX Question how do i get Last member with data

I'm pretty new to Mdx, and have only used it a few times before. So this is probably a really simple question.

First and foremost, I trying to get the Last Week with Data(or last completed week) from the system (it should be Week 9, which is 201009). 
Secondly, I need sums for the last 4 , 13, and 52 weeks. I tried using the LastPeriod function which seems to work perfectly, if only i could get the SUMS of these, instead of each period individually. How do i sum a last period? 
So it should look like this
LWK         L4WK         L13WK         L52WK
598          3000          12000          87000

Thanks for the help!

([Measures].[PL Gross Sales Amt], [Time].[Fiscal Week].&[201009]) ,
([Measures].[PL Gross Sales Amt] , LASTPERIODS (4,[Time].[Fiscal Week].&[201009])),
([Measures].[PL Gross Sales Amt], LASTPERIODS (13,[Time].[Fiscal Week].&[201009])),
([Measures].[PL Gross Sales Amt], LASTPERIODS (52,[Time].[Fiscal Week].&[201009]))
[Time].[Fiscal Year]
WHERE ([Source].[Sources].[Description].&[Posted Navision Sales], 
[Bill To Cust

Beginner Question on reporting service and deployment


Today is the first day that I am trying to create a simple report using SQL Server Reporting services. I god some issues and couple of questions and would like to ask here

1. I created a report model (with two relational tables). Can I create a report based on this report model? The reason, I like to give this model to users so that they can do their customize reports by drag and drop fields (This is similar to creating Universe in the Business object)

2. I created a test report in 'report server project' Using Visual studio (Which comes with SQL Server 2005 reporting service installation). When I try to run that report, it is asking me to define 'TargetServerURL'. I gave the same machine that I am  url (http://srv-test/reportserver), but still I am getting error. Is this the way that I should define? Or should I configure a new server with reporting services installed for deployment?

I know these questions are kind of stupid questions, but as a beginner, I need some basic help to start







Dreaming a world without any war in anywhere

Beginner Question - Where is the best place to start learning SQL? Difference between DBA and Devel

Question says it all.  Thinking about changing gears in my profession possibly to something like SQL.  I'm not sure really where or in which direction to go.  Thoughts?  Thanks.

Show grand total running total in GridView Footer

In many scenarios we need to display Running total as well as Grand total in GridView footer. In this post i will try to explain in an easy way that how we can display running total & Grand total in a GridView footer combindly. To explain this solution using an example here i use a sales order report. The report contains all sales order amount in a tabular way. I will use a GridView to display sales order amount and use GridView footer to display Running total & Grand total. Let we have a customer table with id and name column plus an orders table with OrderID,CustomerID,OrderDate & Amount. Now our goal is to show all customers order with amount as well as page wise running total & grand total. Note that running total is necessary when you enable paging in a GridView where as Grand total is always you can consider.

Beginner's book for ado.net 2.0



Can anyone suggest me a book for beginners in ADO.NET 2.0 ? 

Some basic MVC question

  1. In regular asp net I can run (debug) the application but I can either "view in browser" that gives me the option to view the application and write code on same time.

In MVC I can't find this option.

  1. What is the basic DATA MODEL for working with SQL DB.

I mean with no any framework (entity framework, Sub sonic, Link to SQL etc')

I look for basic application that works with data but with no fw.

  1. What is the popular DB framework that working with data.
  2.  I am looking on  mvc series


C# Soup To Nuts  (the best series ever)


I watch some of the MVC video, seems that the music store is good but I have to wait to the other part.

Does any one know and recommend   a Microsoft MVC tutorial?





Beginner: this doesn't make sense to me


Do you need and "empty" script tag in the head to run scripts that are in the body?  Also, can you run JQuery scripts if they're in the <head> tag?  The first sample only works if the JQuery script is in the form (and body) tag, not in the head - even if I add $(document).ready(function() { });

This works

<head runat="server">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" />
<script type="text/javascript">
<form id="form1" runat="server">
<a href="">Here is a link</a>
<script type="text/javascript">
$('a').click(function () {
alert("you clicked me!");


This doesn't work.  Notice I removed the second <script> tag from the head

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="serve

Web Site to Web Application Question


I've been building web sites and for my next project I will be creating a web application.  I use a 'BasePage' class in all my projects but, since web applications do not contain the 'App_Code' folder, what is the best place/practice for the 'BasePage' class?



connection string question from a newbie


when publishing  in the webmatrix dialogue it asks for "destination connection string" for my "database.mdf"

I was not sure what it was so I pasted this from my web.config file :

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\database.mdf;Integrated Security=True;User Instance=True

it all published ok, but wont run, so I guess it has somthing to do with this connection string or some kind of configuration issue.

My question is this, What should go in the field for "Destination connection string"

Security Question Answer Retrieval


I know there is a method built in for retrieving the encrypted password, but how do I retrieve the encrypted security answer?

What I want to do is have a member profile update screen that the end user can update their password and security question and answer. However, when they get to this page, I want to already be showing the security question (the easy part) and its answer (the not so easy part).

I have updated web.config with passwordFormat=Encrypted and have added a machineKey with the generator (forgot the link, but located on eggheadcafe somewhere).

I haven't done ANYTHING yet, since I already have a user store with hashed information. I wanted to get some functionality done before publishing, wiping the store and recreating users (only a couple developers).


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend