| hyperlink column in datagrid in web user control |
|
 |
Index ‹ Web Programming ‹ ASP.Net
|
- Previous
- 1
- ASP.Net >> DataGrid QuestionQuestion:
I would like to add a ButtonColumn
to a datagrid on the fly .....
Thus far ....
(1) Adding the button works ....
(2) Trying to hook up an event
handler does not work ....
Conceptually, I must be missing
a big point .... (guessing)
Neither Scott Mitchell nor Waltham,
or Payne, or a whole bunch
of other people - in their books, go into this ...
and perhaps its because
I should not be attempting
to do this .....
i.e. dumb approach ?
My purpose in all this is to
get as much as possible off
the HTML page and onto the
code behind page ...
i.e. the myriad properties
and so on .....
I have googlized this to death
but cannot find an example
of a grid with the same minimal
attributes(?) as below ...
Any help or direction would
be very much appreciated ....
---------------------
HTML Page
---------------------
<ASP:DATAGRID
id="dg1"
runat="server">
</ASP:DATAGRID>
---------------------
Code Behind
---------------------
Some Sub
'--------------------------------
' Add Button Column
'--------------------------------
Dim oBut As New ButtonColumn
oBut.ButtonType = ButtonColumnType.LinkButton
oBut.Text = "Select"
oBut.CommandName = "Select"
dg1.Columns.Add(oBut)
'Nada happens
AddHandler dg1.SelectedIndexChanged, AddressOf my_SelectedIndexChanged
Private Sub my_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles dg1.SelectedIndexChanged
Dim s as string = "See Spot run ...."
End Sub
Note:
I have no problem adding a normal button to
a page and adding a handler ......
Thanks in advance for any guidence ....
regards,
John McCarthy
- 2
- ASP.Net >> Compilation errorHi,
When I am trying to add <%#((Hashtable)Container.DataItem)
["moduleSource"] %> to the onclick event to the below tag,
it gives me the below said compilation error. Any idea of
where I am going wrong? But if I remove the same from the
tag, i do not get the error.
<input type="checkbox" Checked=<%#((Hashtable)
Container.DataItem)["IsChecked"] %> onclick="addIt(id,<%#
((Hashtable)Container.DataItem)["moduleSource"] %>)"
id="mSelected" runat="server" NAME="mSelected" >
Compiler Error Message: CS1040: Preprocessor directives
must appear as the first non-whitespace character on a line
Thanks
Reb
- 3
- Frontpage Client >> display won't display, Frontpage 2003Hi, I am very new to web page design, and I am designing a webpage in
Frontpage 2003. I inserted a picture from a file, and it shows nicely
in Frontpage. I then typed in some text below the picture in
Frontpage. It all looks greqat in the preview view in Frontpage.
I saved the webpage. According to the Help guide, Frontpage should
"prompts you to save embedded files to your Web site". However, I did
not receive a prompt.
I then uploaded the page to my web hosting company. When I access the
hosted web page via the internet, I see the text, but not the picture.
There is only a small red x where the picture should be, and an
outline of the picture.
I must be doing something wrong, but cannot figure out what it is that
I'm doing wrong. Any ideas?
Tom
- 4
- ASP.Net >> ASP.NET 2.0 and Version NumberHello all,
First thank you for taking the time to read this. Second, this
question may have a simple answer and i'm missing something..... But
anyway, here is the question.
I've worked with ASP.NET 1.1 for a while now, and we generally set
the version number. In .net 1.1, this is generally done in the
AssemblyInfo.cs (for C#) file. I've started a project (brand new, no
migration) in ASP.NET 2.0 and can't find any where where I could set
this property.
Presently, all the assemblies are coming out as version 0.0.0.0. I
would just like all the resulting asseblies to come out as 1.0.* (if we
can still do the * thing).
I've searched online through google, i've searched the MSDN
documentation, but all the documentation is taking me into more complex
topics....
Thank You,
Frank V.
jawzx01@gmail.com
- 5
- Frontpage Client >> Maintain Frontpage ExtensionsHey all,
Quick Question. Is there a way to FTP upload files to a
site that uses Frontpage extensions with stuffing them up?
Some snazzy client that can maintain them so Frontpage
doesn't get upset?
I am basically looking at trying to allow some people to
edit the site using Frontpage, and others to edit it using
Dreamweaver.
So far it appears as though the answer is no. I am sure
the techs are getting sick of reinstalling my extensions
by now...
- 6
- Frontpage Client >> How do I control attributes of pop-up window? 2I have created two pages, both of which contain the same picture
'FNetNT.jpg'.
I'm trying to create an Image Map, such that clicking on the defined area in
the picture brings up a new window configured to my specification.
I've tried Spawn, thanks to JimCo, and this works fine in my browser. My
problem is that I need to insert the code generated in a particular form
into Obtree C4 content management system, which has some restrictions as to
what can and can't be included.
My two pages are as follows.
Page 1
<p>
<img src="FNetNT.jpg" usemap="#FNetNT">
<map name="FNetNT">
<area target="_blank" href="wat_decode.htm" shape="rect" coords="326, 382,
711, 460">
</map>
</p>
This works only on the defined area, as desired, but brings up a new window
complete with Toolbars, Scrollbars etc which I don't want.
Page 2
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<script language="javascript">function MyWindowNo01</script>
</head>
<body>
<p>
<img border="0" src="FNetNT.jpg" width="720" height="540"
onclick="MyWindowNo01=window.open
(url='wat_decode.htm',name='FNetNTWATDJSU',options='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=500,height=55,left=250,top=250',scaleType='pixel');return
false;">
</p>
</body>
</html>
This works, but on whole picture, not just the defined area, but brings up
a new window in the desired format.
Is there some way I can combine these to get what I want without using
javascript?
- 7
- ASP.Net >> File Download Not WorkingHi there,
when one of my pages loads up, the download dialog box pops up to download a
file.. but the window turns all white and even after you download the file,
the window stays white..
what should i do???
also, on one of my other pages, when i download a word document.. it somehow
automatically puts in all the html code at the bottom of the word document i
just created.. i have no clue how or why it does this, and i can't figure out
how to get rid of it...
any ideas??
thanks
- 8
- Frontpage Client >> downtimeis there a way to tell how much time a server is up or down? Mine seems to
go down a lot - or at least there is an awful lot of times that my .com
email won't come thru - nor my sites show up - can someone try one of these
and see if they come up for you?
www.daystarranch.com
www.mfqha.com
www.ewebexpress.com
thanks
Pam
- 9
- ASP.Net >> rename file on downloadOn my website I have a dynamic link(aspx) to this file 0AX120S.jpg(privacy
protection). When a visitor clicks on the link I want them to see
my_vacation_pic.jpg (fetch realname from database) is this possible with
ASP.NET(C#)?
Thanks
Aaron
- 10
- 11
- ASP.Net >> Event fires repeatedlyI have an event that occurs within a user control. The event is for a
dropdownlist within the user control which fires when the selected item
changes. This user control is created dynamicaly inside another user
control. There are other user controls created within the same
container control, however once the problem control event fires once it
fires again whith any other event fired on the page. Any ideas???
- 12
- Frontpage Client >> Made changes to page, in review browser still shows old page before changesHelp please!!!!!!!!!!!!!
I have modified some pages, saved them and then went to
review browser to see how it will look for the web.
Changes do not change when sending it to the web brower,
so of course when downloading pages to the web it still
shows the old pages and the old date. I have tried for 5
days now, get no where.Always worked before. Now since
this has happended other things keep happening to my
pages, even the default page. We made no changes to it and
I have lost all banners that takes you into my pages. I
now have no pages, they are gone, background is gone from
page. Thought maybe bcentral had something to do with it,
they say no, its a front page problem. We are totally
disgusted at this point. Right now my website only shows
the Default page, has no banners to any pages, so can't
get into any pages, name to the website is gone too. Can
someone please tell me what I can try to do to fix these
problems. I think its pretty bad when a person pays each
month to be using front page and when theres problems you
can't contact support without being charged a fee. I have
had no problems till these last 5 days. Thank you for any
help you can give me. Sandy
- 13
- Frontpage Client >> web discussion pageHi. I would like to add a web discussion page for an on-
line newsletter. I would like to have visitors add their
comments posted on the website. Any ideas how? Does my
host need Microsoft Sharepoint?
Thanks.
- 14
- ASP.Net >> Problem with website on NLB Servers to access the Active DirectoryHello,
I have sometimes the problem to get information from Active Directory
(100 times it works without any problems but the next time I had the problem.)
If I copy the Web-application on the single server It works without any
problem.
The problem is definitely a cluster problem.
(On each IIS itself it works, but when I go over the cluster-IP I get
sometimes the error.
How can I solve this Problem?
Bye Brave
- 15
- ASP.Net >> Caching difficulties (control level)I have an aspx page which loads two user controls, one of which I would
like to cache the content since its data does not change much. However,
when I add the cache directive to the user control, it causes the other
control's data to be cached as well. Any suggestions or clues? Thanks!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
|
| Author |
Message |
JOSIL

|
Posted: Fri Jul 08 17:34:47 CDT 2005 |
Top |
ASP.Net >> hyperlink column in datagrid in web user control
I need 2 different view on spending report for accounting and user. To
accomplish it, I create 2 aspx page AccRpt and UserRpt.
I created a web user control called summary.ascx. In the control, there is
a datagrid which contain a hyperlink column to go to spending detail.
Both AccRpt.aspx and UserRpt.aspx contain summary.ascx.
The web folder structures is:
/Application
/Accounting
/User
/Controls
If an accountant clicks on the link, it should go to accounting/detail.aspx
page. If a regular user clicks, it's supposed to go to user/details.aspx
page
How can I specify the link in the web user control? Thanks
Web Programming339
|
| |
|
| |
 |
souri

|
Posted: Fri Jul 08 17:34:47 CDT 2005 |
Top |
ASP.Net >> hyperlink column in datagrid in web user control
Create a public property in your user control that can set the
Hyperlink control to a given value. Now from your container pages,
setup this URL via the property.
You can ofcourse directly expose the hyperlink in the usercontrol by
making it public, or use 'FindControl' method from the parent pages.
Using a property like above is a better encapsulated way of doing it.
|
| |
|
| |
 |
| |
 |
Index ‹ Web Programming ‹ ASP.Net |
- Next
- 1
- ASP.Net >> URL rewriting doesnt seem to work with xml sitemap provider and menusIm building a mutli-lingual website in .net 2.0 and Im having an issue
with url rewriting and Im having an issue with the xml sitemap provider
and menus. If i have a url:
http://mysite.com/articles.aspx
and then change the local to ru-Ru for instance:
http://mysite.com/ru-Ru/articles.aspx
all the menus still point to the http://mysite.com/articles.aspx link
which puts the local back to english. This happens even if I use just
the page name "articles.aspx" in the url field in the site map
provider.
Does anyone know a way around this? such as a setting that can be
changed?
Cheers
- 2
- ASP.Net >> Available consultants with KraftwareHi,
We have the following 3 consultants available immediately with us:
1: Khalid Ansari - C++/unix
2: Rubeel - Network Engineer
3: Bandi - QA Tester( Only for Bay area)
Please feel free to contact us.
Thanks & Regards,
Mandar Purandare
Kraftware Inc.
Direct : 402 408 6601
Phone : 402 218 2185
Email : mandar@kraftware.com
- 3
- IIS >> Missing dlls installing IISI have a work's laptop running XP Pro that was configured by the IT Services guys and I need to install IIS but when I try (through the Control Panel) it asks for the Service Pack 1 CD. I don't have the disk (I guess ITS are too anal and untrusting) and when I try to browse the i386 folder on the C drive it can't locate infocomm.dll so I have to cancel. I imagine there are other dll files I'd need too but don't know what they would be. Is there any way or anywhere I can download the files without infringing licence? Just completed a 4 day course on asp and really need to consolidate what I've learned before it slips away and it could take up to three weeks to get the guys back to sort out my laptop
Thanks
- 4
- ASP.Net >> ASP.NET 2.0 General InfoHi
Does anyone know when ASP.NET 2.0 is due for full release?
Also, when will large hosting companies such as 1and1 fully support ASP.NET
2.0 rather than the odd beta server offering 50mb or so?
Regards, Carl Gilbert
- 5
- Frontpage Programming >> form field data queryWhen I try out a form I have made, the results (which are sent by email)
include all the data exactly right, except at the bottom I get :
I3.x: 71
I3.y: 12
Can someone tell me what this means please? It might be coming from the
"send" push button, but what does it mean and how can I get rid of it?
Thanks,
John
- 6
- ASP.Net >> User ProfilesI have started creating an application where I make use of User Profiles,
to allow users to enter information about themselves. I now find that
I wish I could create an "Administrator" account that will allow the
administrator to change or edit profile data that a user has placed in their
profile. Is it possible in ASP.NET 2.0 to do that? The application is
already
using an ASP.NET membership database.
Thanks in advance...Ed
- 7
- Frontpage Client >> breaking site down into subwebsThank you Ron, for answering my last question on why
my "recalculating hyperlinks" is NOT working, you wrote
this:
----------------------------------------------
"This is probably a hosting issue, but could be a
networking problem where TCP packets are dropped.
The problem can result from your website being too big for
the server to handle properly. Dividing the web into
subwebs will ease the burden when publishing and
recalculating hyperlinks. Also publishing/recalculating
whentraffic on the server is light (5am Sunday
morning :) ) may succeed."
----------------------------------------------
Now, my site does have about 4050 pages (yes, big), so
maybe you are on to something...I did try recalculating
hyperlinks last night (Sunday, around 4 am), still got
that server error, "could not parse", etc...
So my final question touches on your "dividing the web
into subwebs"...
How do I go about this??...
Do I simply divide the site up into 3 or 4 or 5 sections,
i.e. - different folders?...I can do this easily, but how
will this effect things when I do reports, when and if I
want to publish, etc?...How do I keep everything
interconnected?...For instance, will this cure my renaming
issue?...
How would you suggest breaking a site down into "subwebs",
or quite frankly, does it not matter how I break it
down?...
Can I simply break my site down into 4 or 5 folders, and
publish each folder individually??...Do I even need to
publish if I divide mt site up into 4 or 5 different
folders?...
I think I am 98% sure of what you mean, but I am just
looking for clarification, and want to know what the
potential ramifications are (if any) for doing this, i.e.,
will this create a "broken link" issue when I do reports
if the reports can only see 1/5 of the site at a time
because I have it "sub-divided" into 5 sections...
Thanx so much for your help...
Steve
- 8
- IIS >> Network bios Command Limit has been reachedHello, we are having a problem with are 2 NLB webservers. When we try to
create a new Virtual Directory it shows as an error icon and in the status
field it reports the message. "Network bios Command Limit has been reached"
Now I know the first thought most of you will have an that is the knowledge
base article 810886 which says to change the registry in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters.
We've tried that and a number of other things to no availe.
Let me give you the low down on the setup. We have two web servers hosted by
a 3rd party, these connect to storage on a Solaris NAS. Also to a w2k server
with SQL. Over 2 years ago we had an engineer who tried to use the builtin
IIS replication tool whilst I was on holiday. This created havoc and took
down one of the web servers because it duplicated all the web sites etc...
Sometime after his departure, which wasn't that long after! We started
noticing these issues when trying to create VDs. We went through the KB
articles we passed it over to the 3rd hosting party support they have all
come back blank.
This is hopefully where you guys come in. We're hoping that someone has come
across the before and found a fix.
- 9
- 10
- Frontpage Client >> How to share parts of an Excel spreadsheet.I have a large spreadsheet that has colors & comments & many columns. I have
several people who need only certian columns of the spreasheet. Each one
needs diffent columns from the spreadsheet. How do I create a document that
is linked to the main, but only shows the needed columns for each user?
Number of total rows in the main spreadsheet is always changing.
--
Bstruck
- 11
- ASP.Net >> Hide path to URL files?Hello,
I have a domain URL on a shared hosting server for example www.mydomain.com
When accessing www.mydomain.com I would like to get the ASPX files from
other domain on other server for example www.otherdomain.com but I would like
the URL on the browser for all the ASPX files will always stay on
www.mydomain.com so the one who browse my website will not see for example
www.otherdoamin.com/Default.aspx
Thanks in advanced for any advice.
Regards,
Asaf
- 12
- ASP.Net >> Disabling default button behaviorIf a user is viewing an ASP.NET page in the browser and presses Enter, the
first button the page is "pushed" even if not selected. We are finding the
novice users are pressing Enter (thinking it will bring them to the next
field) and getting very confused. Advancing to the next field would be
nice, but I would settle for doing nothing.
Is there a way to disable this behavior? I suppose I could override the
"onkeydown" event in JavaScript for every single field. Is there any better
solution?
- 13
- ASP.Net >> Need general approach for hiding filesHello, I have a very simple problem I don't know how to approach. I
need a suggestion about the general approach to take.
I have a bunch of html pages on a machine, all in the same folder
"logs". Each html page contains a log. The filenames look like
logs/log-xxxx.html
where xxxx is a user-id. (Each file logically belongs to a different
user).
I am developing a web site in asp.net which allows each user to see
his own log.
The obvious approach is to have a page where I dynamically create a
link <a href="logs/log-xxxx.html">, where xxxx depends on the user
authenticated in asp.net. This works: when the user clicks the link,
the html opens in a new window. But, in the browser's location bar,
the user sees the full path of the file, e.g.
http://localhost/WebSite/Docs/log-1234.html
Now, if he were to manually change the number on the location bar,
either by mistake or intentionally, he would see the log of another
user! This is not acceptable for privacy reasons.
What is a general approach to solve this problem? I mean, allowing the
user to only obtain his html file and not somebody else's. Have I to
write a httphandler, or is there a simpler solution?
Thanks a lot for any help,
Maurizio
- 14
- IIS >> software auto update on IISHi,
I have installed SUS on a dedicated IIS server. It worked fine until one day on Nov 2004.
On the sync log. it says:
Error writing to the content folder 'f:\SUS\content\cabs'. (Error 0x80070003: The system cannot find the path specified.)
f: drive is a network drive on another server. But I have tested the connection that is fine.
Can anyone help me solve this problem?
Thanks a lot.
AT
- 15
|
|
|