473,396 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to pass parameter in address field of href tag in asp.net??

121 100+
hello everyone,
what i am trying to do is pass a value in
Expand|Select|Wrap|Line Numbers
  1. <a href="abc.aspx?id=123">
but instead of giving that abc.aspx link here, i want to give job.webpage(where job is class with webpage property) ,
as this <a> tag is in repeater so depending on the value in repeater my page should be redirected to job.webpage(which stores the url of page) ..

hope i am clear..

any help would b appreciated.
Oct 1 '08 #1
2 5635
Frinavale
9,735 Expert Mod 8TB
I'm not entirely sure about what your problem is.
When you are creating the data source for the Repeater you should use the DataBinder.Eval method to retrieve the value stored within the Job.webpage property....I'm assuming that your repeater is databinding to a list of Job ojects...

Eg:
Expand|Select|Wrap|Line Numbers
  1. <asp:Repeter ID="theRepeter" runat="server">
  2.     <ItemTemplate>
  3.         <!--.......-->
  4.         <a href="<%# DataBinder.Eval(Container.DataItem,"webPage") %>">linky</a>
  5.         <!--.......-->
  6.      </ItemTemplate>  
  7. </Repeater>
  8.  
Oct 1 '08 #2
jay123
121 100+
I'm not entirely sure about what your problem is.
When you are creating the data source for the Repeater you should use the DataBinder.Eval method to retrieve the value stored within the Job.webpage property....I'm assuming that your repeater is databinding to a list of Job ojects...

Eg:
Expand|Select|Wrap|Line Numbers
  1. <asp:Repeter ID="theRepeter" runat="server">
  2.     <ItemTemplate>
  3.         <!--.......-->
  4.         <a href="<%# DataBinder.Eval(Container.DataItem,"webPage") %>">linky</a>
  5.         <!--.......-->
  6.      </ItemTemplate>  
  7. </Repeater>
  8.  
thanks, it worked.. exactly what i wanted..
Oct 2 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

110
by: Mr A | last post by:
Hi! I've been thinking about passing parameteras using references instead of pointers in order to emphasize that the parameter must be an object. Exemple: void func(Objec& object); //object...
3
by: DCB | last post by:
Hello. I have an easy question, likely, that has me in a headspin. I have an include file to a frames based site that basically forces frames on the end user if they visit the site and hit a...
2
by: Tony Johansson | last post by:
Hello! I use method forName and newInstance in class Class like this instance = (GameFactory)(Class.forName(name).newInstance() ); Now to my question: Assume that name is GameFactory then I...
4
by: Todd Perkins | last post by:
Hello all, surprisingly enough, this is my first newsgroup post, I usually rely on google. So I hope I have enough info contained. Thank you in advance for any help! Problem: I am getting...
6
by: Minfu Lu | last post by:
I have a problem dealing with passing a function address to a COM callback. I use this COM function for communicating to a hardware. My original project was written in VB. I have converted it to...
5
by: David++ | last post by:
Hi folks, I would be interested to hear peoples views on whether or not 'pass by reference' is allowed when using a Web Service method. The thing that troubles me about pass-by-reference into...
1
by: menmysql | last post by:
hi to all, in my jsp page hyper links are there starting from "A" to "Z". when ever i click on any one of those links it should call itself and pass a parameter of its value. for example...
12
by: ArunDhaJ | last post by:
Hi Friends, Is it possible to pass a table as a parameter to a funtion. whos function declaration would look some thing like this.... ALTER FUNCTION TempFunction (@TempTable TABLE, @nPId INT) ...
3
by: jmDesktop | last post by:
I have searched much but cannot find answer to this seemingly simple question. I have a function that builds an html element like this, which works fine: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.