Having an issue with passing the text of a link to a session variable.

I am having an issue with passing the text from a link to a session variable. I am adding this html as a literal for each item in the list that i have populated with a query.
List<Literal> lit = new List<Literal>();
for (int i = 0; i < posts.Count; i+=4)
Literal someLit = new Literal();
someLit.Text=
@"<div class='row'>" +
"<div class='col-md-12'>" +
"<div class='panel'>" +
" <div class='panel-body'>" +
" <!--/stories-->" +
" <div class='row'> " +
" <br>" +
"<div class='col-md-2 col-sm-3 text-center' id='javascript'> <h3>" +
" <a href='#' runat='server' onserverclick='UserProfile_Click'>" + posts[i + 3] + " </a>" +
"</h3>" +
" </div>" +
" <div class='col-md-10 col-sm-9'>" +
"<h3><a href='Thread.aspx' runat='server' onserverclick='MyFuncion_Click'> " + posts[i] + " </a></h3>" +
" <div class='row'>" +
" <div class='col-xs-9'> " +
posts[i + 1] +
" </div>" +
"<div class='col-xs-3'></div>" +
posts[i + 2] +
" </div>" +
"<br><br>" +
" </div>" +
" </div>" +
" <!--/stories-->" +
" </div>" +
" </div>" +
" </div><!--/col-12-->" +
" </div>" +
"</div>";
lit.Add(someLit);
for(int i=0; i<lit.Count; i++)
this.Controls.Add(lit[i]);
I use one of the list positions as the text for a link in two different spots. For now, lets only talk about the line:
<a href='#' runat='server' onserverclick='UserProfile_Click'>" + posts[i + 3] + " </a>
Since I am generating these controls at pageLoad, I can't make them <asp:Linkbutton>s. And since they are anchor elements, I don't have access to an onCommand attribute or onservercommand attribute.
All I want to do is access the content from inside the specific link tags that I generate on link click and set it as a session variable. That's what I would like my UserProfile_Click function to do. I cant commandargs it in like i can with a linkbutton's
OnCommnad attribute, however.
My fear is that the onserverclick attribute resolves so something else on pageLoad normally and since I am generating it the way I am similar to the way a <asp:linkButton> resolves to a generated JavaScript.
Any help?

@Brunellus
For questions related to ASP.NET use the ASP.NET forum http://forums.asp.net     
You should get more, better and faster answers on the other forum.  Thanks, ahead of time.
Best Regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • I have been having a issue with getting the colors on my monitor to match the colors fro my print lab. I now have the monitor calibrated to match the prints but when I open elements it doesn't use the same colors. If i have it use the calibrated profile b

    I have been having a issue with getting the colors on my monitor to match the colors fro my print lab. I now have the monitor calibrated to match the prints but when I open elements it doesn't use the same colors. If i have it use the calibrated profile by changing the color management settings, the color picker no longer shows true white or black. How do I get elements 12 to honor the new calibrated settings?

    Ok so I've done what you said and this is what it's come back ....
    I don't know that these are the errors , but they're the things which don't look right ...
    Throughout the shut down there is a recurring line ;
    It says ;
    Com.apple.launchd 1 0x100600e70.anonymous.unmount 301 PID still valid
    Then there are 2 more which I think are related ;
    Com.apple.securityd 29 PID job has I overstayed its welcome , forcing removal.
    Then the same with fseventd 48 and diskarbitrationd 13
    Oh and on Launchd1 : System : stray anonymous job at shut down : PID 301 PPID13 PGID 13 unmount...
    Then the last process says "about to call: reboot (RB_AUTOBOOT).
    Continuing...
    And stops ...
    Hope this means something to you ... Thanks again for your help so far :-)

  • I have been having issues with not receiving texts and voicemails daily, for a few months now. If I turn the phone completely off, when I turn it back on the messages will flood in from hours before. I can't be continually turning off my phone in case som

    I have been having issues with not receiving texts and voicemails daily, for a few months now. If I turn the phone completely off, when I turn it back on the messages will flood in from hours before. I can't be continually turning off my phone in case someone left me a message. How do I resolve this issue?

    Wifi:  my Cell phone will remember 10 wifi connections.  So delete any you don't use often and your home wifi and try to enter home wifi again.
    if it still won't connect to home wifi, call your internet provider for help.  You may need a newer router or different settings Or upgraded service.   Your phone seeks the best connection and will refuse lesser connections.
    last resort.  Backup the phone.  Do a full reset, then restore as new with the backup.
    if still not fixed, go back to apple and insist on repair or replacement.
    HOWEVER.   voicemail is not a wifi issue, it's a carrier function, which is why the SIM card is a suspect.

  • I am having major issues with links in keynote! Even though the links (a navigation system) are on the master page, they are only working on some of my slides. Anyone have ideas on how to fix this or similar issues? Help!

    I am having major issues with links in keynote! Even though the links (a navigation system) are on the master page, they are only working on some of my slides. Anyone have ideas on how to fix this or similar issues? Help!
    I have created a navigation system on the master pages and set the presentation to links only mode. I also have other links scattered throughout the program, like a linkable table of contents, etc. Some of them work, some of them don't. Not sure why. Anyone out there having similar issues? Or have any idea on how I can solve this issue? Any help would be appreciated!
    Thanks!

    Links should not create any problems in Keynote.  If they are set up correctly on text, the text will be underlined. Objects that have links will have a curved arrow bottom right, if you click the arrow a popup will display the link information.
    Try this repair for Keynote,  ensure you complete all the tasks and in the order shown:

    delete all the iWork applications if you have them, not just Keynote, using Appcleaner from Mac Update, its a freeware application

    empty the trash:  Finder > Empty Trash

    Shut down your Mac, wait 30 seconds, then power on the Mac, immediately after the start chime, hold down the Shift key
    When you see the grey Apple symbol and progress indicator (a spinning gear), release the Shift key.
    If you are prompted to log in, type your password, then hold down the Shift key again as you click Log in.
    4  
    Let the Mac fully boot up, it will take longer as the OS is repairing the drive

    when fully booted, go to Applications > Utilities > Disc Utility; click on the boot drive then First Aid tab and click  repair disc permissions

    when complete, restart the Mac normally, Apple menu > Restart

    install Keynote from the Mac App Store
    let us know if this helped

  • I have an older version of Firefox 3.6.6 I believe I am having an issue with one of the websites I sign into. Is there any way to update to the newest version

    I have an older version of Firefox 3.6.6 I believe I am having an issue with one of the websites I sign into. Is there any way to update to the newest version. Without losing all my bookmarks and saved pass words?

    Hello johngervais, the latest firefox version is 26.0 (today 4 Jan 2014).
    note that [https://support.mozilla.org/en-US/kb/firefox-no-longer-works-some-versions-windows-xp Firefox no longer works with some versions of Windows XP], if you have '''xp with sp2 and above''' you can update to latest version, see : [http://www.mozilla.org/en-US/firefox/26.0/system-requirements/ Firefox 26 System Requirements]
    if you are able to update to latest version then see : [https://support.mozilla.org/en-US/kb/common-questions-after-upgrading-firefox-36 Common questions after upgrading from Firefox 3.6]
    see also : [https://support.mozilla.org/en-US/kb/firefox-just-updated-why-it-asking-me-update-again Firefox just updated - why is it asking me to update again?]
    Don't worry you won't losing bookmarks and passwords after update firefox.
    thank you

  • I am using an early 2008 MacBook Pro and am having issues with it deleting text on its own (in word, emails, etc.). As I am typing it all of a sudden starts deleting and I can't stop it. What can I do?

    I am using an early 2008 MacBook Pro and am having issues with it deleting text on its own (in word, emails, etc.). As I am typing it all of a sudden starts deleting and I can't stop it. This happened once before and it was due to a buldging battery pressing on the track pad. I checked the battery and it appears to be fine. What can I do?

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up guest users” (without the quotes) in the search box. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Shut down your computer, wait 30 seconds, and then hold down the shift key while pressing the power button.
    When you see the gray Apple logo, release the shift key.
    If you are prompted to log in, type your password, and then hold down the shift key again as you click Log in.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.  The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode.
    Test while in safe mode. Same problem?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • Hi, i am having an issue with a basic motion scroll effect.  I already watched and read every tutorial out there regarding this topic and even tried the adobe chat support, but the guy on the other end of the line disconnected me-, probably he didn't unde

    Hi, i am having an issue with a basic motion scroll effect.
    I already watched and read every tutorial out there regarding this topic and even tried the adobe chat support, but the guy on the other end of the line disconnected me…, probably he didn't understand what i wanted from him because english is not my native language, so a will try to be very, very clear about this one..
    please note, that i am new to muse, this is my first project ever.
    my idea is as following:
    when the customer comes to our companies site, he just sees our logo on a white Background. the logo consists of, say, four elements. when the customer scrolls down, the logo starts to disassamble: first the first part of the logo flies out the left side of the site, then the second part of the logo vanishes down, then the third part of the logo flies to the right, then the fourth part of the logo flies to the top and out of the customers view. given what i have seen, it is possible to do that….
    so…..
    now i have the four parts of my logo imported as png files into muse and assembled them in design view to build our companies logo. I select every one of the four parts and go into the scroll effects tab left beside the layers tab. first i enter the same values for every one of the four parts: initial motion: 0x and 0x again for the left and right motion; key position ( t-handle) : 0px; final motion: 0x and 0x again for the left and right value.
    now i hit "preview".: the logo is "pinned" at the correct position, i can scroll but the logo stays where it is. so far so good….
    now i select all the four elements again and go to the scroll effecs tab. at "final motion", i click the down arrows and enter 1x. I hit Preview…
    when i am scrolling down the WHOLE logo goes down…. so far so good.
    NOW i want the first part of the logo to go down, THEN the second part to go left, THEN the third part to go up, THEN the fourth part to go right.
    so i select ONLY the first part, go to the scroll motion tab, at "final motion" i click the left arrows, then i enter 1x.( the up-down value, i set to 0 again).. i hit Preview…
    the first part of the logo goes left as soon as i start scrolling, the other three parts still go down at the same time…
    NOW i want the second part of the logo to start moving, when the first part has left the scene, not at the same time as the first part.
    SO I SELECT THE SECOND PART AND DRAG ITS T-HANDLE (KEY POSITION) DOWN TO, LETS SAY, 200PX. SO IT STARTS MOVING ONLY AFTER THE CUSTOMER HAS REACHED THAT POINT, RIGHT?
    BUT WHEN I PREVIEW THAT ****, THE LOGO IS NOT TOGETHER ANYMORE, THE SECOND PART IS FLOATING ANYWHERE ELSE BUT WHERE IT SHOULD BE…..WTFF????
    short: when i move the t handle, the initial position of the object changes. thats what i said to the adobe employee, but he said, that thats the expected behavior….
    but if thats so, how can i have my four parts correctly together, so they form my logo, but with different t handles, so that they all start to move at different times??
    Pleeease help me, i am dying of frustration here…..:( that behavior cant be right, right?
    Thanks so much to everyone who actually reads this post and tries to help…….
    All the best,
    Niki Lapan

    Thank you so much for helping,
    But i really wonder how you did that. did you always switch between design view and preview view, then change the key position for 2px then switch back, to align the four letters? because i imagine that can get really frustrating, if you have a logo consisting of 58 parts instead of 4!:)
    Anyway thank you very much for your time and effort!!!!

  • How can I recover an old/disused iCloud account. I was having some issues with my apple id so I restored my iPad, I am now stuck on the activation screen as I no longer use the iCloud account i used to set up the iPad and can't remember the address or pas

    How can I recover an old/disused iCloud account. I was having some issues with my apple id so I restored my iPad, I am now stuck on the activation screen as I no longer use the iCloud account i used to set up the iPad and can't remember the address or pas

    I have the same problem - it is maddening. I rely on this iPad for work so this is not just an annoyance! The above solutions of changing the appleid on the device or on the website do not work.
    The old email address no longer exists - I haven't used it in a year probably and I no longer have the account.  I logged into the appleid website and there is no trace of the old email address so there is nothing that can be deleted or changed there.  On the iPad there is no trace of the old email address so nothing can be deleted there either. I have updated the iPad software and the same problem comes right back.  Every 2 seconds I am asked to log in using the old non-existent email.  The device is currently useless.
    The only recent change to anything was the addition of an Apple TV device, which was set up using the correct login and password.
    Does anyone have any ideas? The iPad has been backed up to the iCloud so presumably it now won't recognize the current iCloud account? So restoring may notbe an option?

  • HT1925 I am having an issue with loading Itunes. I receive a missing dll file notice. Then another error message. I have reinstalled Windows & still get the error. I did not get the error until I recently did an ITunes update.

    I am having an issue with ITunes after a recent ITunes update. I can not open ITunes, I get a message missing MSVCR80.dll file, Then an error 7 message. I have redone the OS for Windows 7 and restarted the computer. I keep getting the errors.

    Do the following:
    Uninstall from Windows the following five programs: iTunes, Apple Software Update, Apple Mobile Device Support, Bonjour and Apple Application Support. You do this from an applet in Control Panel called Programs & Features (in Windows 8, 7, or Vista) or Add or Remove Programs (in Windows XP).
    Download the latest version of iTunes from Apple and note the location you're saving it to so you can find it once it's done.
    Run the iTunes installation as an administrator, just Right click iTunes installer and Run as Administrator.

  • Since updating my iPhone 4 to iOS 5.1 I'm having compatibility issues with my speakers and my iTunes wifi sync isn't working. Anyone else having the same problems?

    Since updating my iPhone 4 to iOS 5.1 I'm having compatibility issues with my speakers / docking station and my iTunes wifi sync isn't working. Anyone else having the same problems? Both worked fine until the update...

    Okay. I got it working again by setting it up as a new phone instead of just syncing. Then I backed up. All is good today.

  • I am having an issue with my adobe acrobat 9 pro. Every time I try to open a pdf from someone it opens it up with my free adobe reader rather than the Acrobat 9 pro so then I don't have all of the functions of 9 pro. How do I get it to open with 9 pro ins

    I am having an issue with my adobe acrobat 9 pro. Every time I try to open a pdf from someone it opens it up with my free adobe reader rather than the Acrobat 9 pro so then I don't have all of the functions of 9 pro. How do I get it to open with 9 pro instead of the free reader?

    It may depend on the plugin that is loaded into your browser. However, right click on a PDF and select the Open With option and go to the default button to select Acrobat as the default. That might do it.

  • I've been having an issue with assistive touch, every time I open an app. the AT disappears the from the screen and I have to turn it off and ON again. Is there a way to fix this?

    I've been having an issue with assistive touch, every time I open an app. the AT disappears the from the screen and I have to turn it off and ON again. Is there a way to fix this?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.

  • I am having strange issue with my apple tv...i set up pictures to scroll through to the tv using home sharing.  Now album covers are interspersed with my pictures.  I have been using apple tv for a while and never had this happen before

    I am having strange issue with my apple tv...i set up pictures to scroll through to the tv using home sharing.  Now album covers are interspersed with my pictures.  I have been using apple tv for a while and never had this happen before

    Are you watching this content though iCloud or though from iTunes on your local computer?  If it is from iCloud have you tried downloading the content to iTunes and watching it on ATV from that source to see if it still happens?  This is geerally a much more reliable way to view the content.  Easer to fast forward and rewind too.
    - I have a stable internet connection
    Clearlly you don't
    >(Ive tested on other devices)
    Which does not tell you anything about the specific connnection from ATV to iCloud.
    >I am able to stream Netflix problem free from my AppleTV without so much as a hicup
    Again which does not tell you anything about the specific connnection from ATV to iCloud.
    >- I am able to download the episodes to my phone, ipad, and computer without any issues
    Again which does not tell you anything about the specific connnection from ATV to iCloud.  It does remove your ISP throattly traffice as a possible cause though.  So that is good.
    Have you checked your wireless rounter?  Tried doing the factory restor on it?  Upgrading it's firmware?  Is it and or ATV getting extreamly hot when this problme happens?

  • I am having sound issues with Pottermore while using Safari 6.1. I once muted the sound and now can't unmute it even though the icon tells me it's unmated. I can hear samples of audio books in the store section.  Any ideas?

    I am having sound issues with the website Pottermore while using Safari 6.1. I once muted the sound and now can't unmute it even though the icon tells me it's unmuted. I can hear samples of audio books in the store section.  Any ideas? I have reset Safari.  Website works fine on Firefox.

    I am having sound issues with the website Pottermore while using Safari 6.1. I once muted the sound and now can't unmute it even though the icon tells me it's unmuted. I can hear samples of audio books in the store section.  Any ideas? I have reset Safari.  Website works fine on Firefox.

  • Captivate 5.5 Question: We seem to be having an issue with the screen capture piece not recording "e

    Captivate 5.5 Question: We seem to be having an issue with the screen capture piece not recording "everything".
    We're running 5.5 as an administrator on Windows 7 and my co-worker is trying to capture a webinar (GoToMeeting) with Captivate and it is not recording anything in the GTM window, except the last slide. Anyone have this problem or know a fix? Not much is mentioned in the Adobe forums.

    Captivate simply doesn't 'hear' some screen events on certain applications and you just need to resort to doing manual captures at these points.
    I usually set up my manual capture button to be F2 so that I can hit it with my left hand while my right hand is on the mouse navigating through the task.

Maybe you are looking for

  • I want to set up firefox with 2 seperate home pages, using google with 2 different email addresses

    I use igoogle, and I have 2 separete email addresses which I use for seperate reasons, as I will be setting up a web page using one of them. As to this I wondered if there was a way to set up having 2 shortcuts or 2 downloads of firefox with each one

  • Recording my gameplay on minecraft

    I want my parents to buy me something that will allow me to record my gameplay and voice and post it on YouTube. How do I do that?!

  • Reports and Forms display

    I built a report with a link. That link, links to a form and pass a parameter COD to fill a form. But the problem is that i can't display the content of the report and in the form which is in the same page. How can i solve this problem? Thanks Joao

  • Account update receives an error message.

    I try to log in to my account to get to my Personas. It won't accept my log in info. So I ask to reset the password. That works. But now next to my username is a series of numbers. I try to change my e-mail address, and it tells me my user name is in

  • How to make background transparent

    I figured it out BUT it made the text transparent also which I don't want. So I separated the text out into a separate DIV. But its taking on the transparency still (css?). I'm sure there's a way, can someone help?  I basically DON'Y want transparenc