|
Where did you get the dhtml. I have tried several things. I currently use the combobox that I believe is Forms 2.0 from Access.
|
|
|
|
|
Yeah I've used that one before... Pretty good except it works funky (I think all the controls in that library arent supported unless their hosted on an Office Style UserForm). Like after using the combobox you have to click buttons twice for the OnClick Event to fire.
Anyways this is a home-grown ComboBox implimented as an Element Behavior. I can email it to you if you'd like.
|
|
|
|
|
I would like. Seems I have tried that. The one I used worked good but when the page loaded, it flashed all the html to build the box. I have about 3000 entries.
|
|
|
|
|
|
Yes I did. Thank you very much. The code seems to be quite complex and I am not very fluent in behaviors. I have not gone thru it yet but hopefully I can do that this week. Thanks again. I still want to explore the C# server control solution but apparently not many people know the answer. I am very dissappointed that MS only provides ONE EVENT for the web form control. I cannot believe this is not possible. Any answers welcome. Thanks again Chris.
|
|
|
|
|
It's understandable to be dissapointed with the lack of events from the DropDownList and other web and html controls that ASP.NET expose, but then again its the nature of the environment. Every event that fires on server objects requires a postback. You could imagine how impractical it would be to make a round trip back to the server every time a user pressed a key or ran the mouse over a control.
|
|
|
|
|
I need to search a variable for a string, but do not know how. can someone help me.
oh, and does anyone know a good reference site of asp functions?
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "What goes up must come down. Ask any system administrator"
|
|
|
|
|
Try the InStr function.
A good reference site is the MSDN site(http://msdn.microsoft.com). For ASP/VBScript check out the Scripting section of MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vtoriVBScript.asp) or the Active Server Pages.
/WW
|
|
|
|
|
|
strReverse() should do it:
a = strReverse("ABC")
/WW
|
|
|
|
|
just one more question, how to remove any characters from the string that are not normal characters (e.g. a-z)
if you are wondering why I am asking all these Q's, is because I made some code in PHP, i converted it to Javascript for codeproject, and was gonna convert it to asp for codeproject, only problem is, I dont know any asp.
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "What goes up must come down. Ask any system administrator"
|
|
|
|
|
|
I have copied the following code off phpbuilder.com but cannot find anything similar for stripping HTML comments...
I'm assuming the posix regex is the same across the board and was hoping someone out there in CP land (seeing how I don't seem to be getting answered at PHP sites) could possibly help me...
$buffer = eregi_replace("<script[^>]*>.*</script>","",$buffer);
Where is my regex going wrong in the comments stripping...?
Anyone help...thanx...
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hockey wrote:
Where is my regex going wrong in the comments stripping...?
I don't see anything wrong with it off the top of my head, but try escaping the exclamation mark just to be safe. And, of course, I'd like to know what you find out so I'll know for future reference.
Jeremy L. Falcon<nobr>
Homepage : Sonork = 100.16311
"But everybody darlin' sometimes bites the hand that feeds."
"Remember in this game we call life that no one said it's fair."
"Just because you're winnin' don't mean you're the lucky ones."
Song: Breakdown - Album: Use Your Illusion II - Artist: Guns N' Roses
|
|
|
|
|
Um, after looking at it again I did notice the regex for the comments is commented out! Maybe that's why it's not being pulled?
Jeremy L. Falcon<nobr>
Homepage : Sonork = 100.16311
"But everybody darlin' sometimes bites the hand that feeds."
"Remember in this game we call life that no one said it's fair."
"Just because you're winnin' don't mean you're the lucky ones."
Song: Breakdown - Album: Use Your Illusion II - Artist: Guns N' Roses
|
|
|
|
|
Thats just a typo...sorry...I forgot about that...
The comments don't exist in the actual source code...
The regex to strip JScript works great, so I figured i'd try and use the same syntax for comments...however what actually happens...i think is it finds the first comment
...Some Body HTML
<!-- comment -->
I'm very very new to regex, so I know nothing about whats going on...basically I just understand the concept...
Is there a repeat or counter character that shouldn't be there...???
Any ideas...?
Thanx in advance..
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hockey wrote:
removes anything in between
OIC, try these expressions then...
$buffer = eregi_replace("(<script[^>]*</script>)", "", $buffer);
$buffer = eregi_replace("(<!--[^>]*-->)", "", $buffer); Brackets will match a sequence of characters, parenthesis will group characters, and nothing will match explicitly and can be considered as one big ol' group. I made the change to the script tag one too, because after realizing the issue I noticed it also had the same problem.
Hockey wrote:
I'm very very new to regex, so I know nothing about whats going on...
I'm not new to regex, and the complicated ones can still look like Chinese to me.
Jeremy L. Falcon<nobr>
Homepage : Sonork = 100.16311
"But everybody darlin' sometimes bites the hand that feeds."
"Remember in this game we call life that no one said it's fair."
"Just because you're winnin' don't mean you're the lucky ones."
Song: Breakdown - Album: Use Your Illusion II - Artist: Guns N' Roses
|
|
|
|
|
AFAIK the script removal code I used works fine...although I only tested it with ONE script tag present...I dunno if it works with 2 or more so it's a good thing you made me think about it...I'd better test it...
I'll definetly have to try yer version of the regex for stripping comments though...cuz i'm starting to loose my mind here...
Thanx alot...
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I am having problems finding out how to convert a time from a client's local time zone to GMT/UTC.
It seems the classes I should use would be in the .NET SDK for either System.TimeZone or System.Datetime. However, the .NET Framework SDK's System.TimeZone object does not have a public constructor (and is abstract) and the System.DateTime only creates its CurrentLocalTime according to the server the code is running on.
So, how do I create and specify another timezone? Most of the examples I have found either use JavaScript to display the value in the client's system time or use the standard offset for the client's timezone (which usually does not take into account Daylight Standard Time and the varying dates that the timezone switches to Daylight Time).
Any help is greatly appreciated. Thanks!
Chris
|
|
|
|
|
|
Chris,
Thank you very much for your response. The section doesn't really tell me how to solve my problem, but actually re-enforces it.
A clip from section 2:
"Methods and properties in the DateTime structure always use the local time zone for calculations and comparisons... You can also choose to format a DateTime for a specific culture."
To elaborate, these classes only allow me to create a DateTime or TimeZone class based on the local time (of the system executing the code, i.e. webserver). Instead, I need to create a DateTime or TimeZone based on a parameter, representing the timezone of the site user's system.
Any other ideas?
Thanks again,
Chris
|
|
|
|
|
I found this code at msdn site explaining how to make a master/detail view:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebteam/html/webteam02052002.asp
The code is listed below.
musicLibrary.xml
<Artists>
<Artist name="The Chipmunks">
<CD id="4550" name="Eponymous" image="Eponymous.jpg" />
<CD id="4557" name="Hibernation" image="Hibernation.jpg" />
<CD id="4577" name="Going Nuts" image="GoingNuts.jpg" />
</Artist>
<Artist name="The Dogs">
<CD id="4640" name="Full Moon" image="FullMoon.jpg" />
<CD id="4637" name="Old Shoes" image="OldShoes.jpg" />
<CD id="4664" name="My House" image="MyHouse.jpg" />
</Artist>
</Artists>
music.aspx
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<html>
<script language="VB" runat="server">
Dim DS As Dataset = New DataSet
Sub Page_Load(Src As Object, E As EventArgs)
DS.ReadXml(Server.MapPath("musicLibrary.xml"))
Dim CSource As DataView
CSource = DS.Tables("Artist").defaultView
MusicList.DataSource = CSource
'a little code to help display what table relations exist
RelationsGrid.DataSource=DS.Relations
DataBind()
End Sub
</script>
<body>
<ASP:Repeater id="MusicList" runat="server">
<ItemTemplate name="ArtistTemplate">
<br /><br /><b><%# Container.DataItem("name") %></b><br />
<ASP:Repeater id="CDList" runat=server
datasource='<%# Container.DataItem.CreateChildView("Artist_CD")%>'>
<ItemTemplate name="CDTemplate">
<img src="<%# Container.DataItem("image") %>"align="absmiddle"/>
<%# Container.DataItem("name") %><br />
</ItemTemplate>
</ASP:Repeater>
</ItemTemplate>
</ASP:Repeater>
<br /><br />
<ASP:DataGrid id="RelationsGrid" runat="server"
Width="300"
BackColor="#ccccff"
BorderColor="black"
ShowFooter="false"
CellPadding=3
CellSpacing="0"
Font-Name="Verdana"
Font-Size="8pt"
HeaderStyle-BackColor="#aaaadd"
MaintainState="false"
/>
</body>
</html>
My problem is that it uses an xml file as a datasource.
Where i want to use two related tables from a database, but i can't seem to figure out how to do that.
I have created a dataset containing the two tables, I have also created a datarelation between the two tables.
I am able to write out the master table if i remove the nested repeater control.
If anyone is able to solve this problem i think a lot of people would be grateful. as i've seen questions
about this master detail thing around the net.
Venlig hilsen / Regards
Steffen Otto Jensen
(Denmark)
|
|
|
|
|
New (relatively) to .Net , and I've got a quick question:
Is it possible (and if so, a hint would be appreciated...) to have separate config files or separate config file sections for a number or custom user controls?
for example, say I've got a page with a "Latest News Display" control as well as a "User Poll" control. I'm looking to store things like the db connection strings in a "web.config" file.
Barking up the wrong tree or just a bit slow?
TIA.
Mike Stanbrook
mstanbrook@yahoo.com
|
|
|
|
|
|
Beauty! Thanks much..
(So does that prove that I was just "SLOW"?)
Mike Stanbrook
mstanbrook@yahoo.com
|
|
|
|