|
|
 |
| ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, win occasional prizes given to our best members, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|
 |

February 25th, 2009, 05:41 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2007
Location: , , .
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
|
|
How to add a script file programtically?
Hi
I have a jquery script that I need to add to my pages through C# code. The way I am doing it now causes trouble with the .net ajax toolkit.
I have it like this
<script src="<%= ResolveClientUrl("Javascripts/jquery-1.3.1.min. js") %>" type="text/javascript"></script>
I am using ResolveClientUrl because I have some pathing issues if I don't.
But when I have anything from the toolkit I get this error
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
I found a person saying that to avoid this you have to put your script programatically in but I don't know how to do this.
Thanks
|

February 25th, 2009, 05:49 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 165 Times in 162 Posts
|
|
|

February 25th, 2009, 07:02 PM
|
|
Friend of Wrox
|
|
Join Date: Sep 2007
Location: , , .
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
|
|
Quote:
Originally Posted by Lee Dumond
|
Thanks your a lifesaver lol.
How would you add a script in C# codebehind? Just curious.
|

February 26th, 2009, 06:58 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2008
Location: So Cal is good enough for you, California, USA.
Posts: 133
Thanks: 15
Thanked 1 Time in 1 Post
|
|
Using the Grid View
okay so basically i use the login control to make my account on my website (aside from the issue that i can not log in with that account more than once...), i want to use the gridview to show all the members. the problem is it shows everything, security answer/question, is online, provider, etc... i just want to pull out the isonline and UserName columns but idk what table the data is being held in i looked at the tables folder in the database manager on VWD and there is no table i see with those column names.
if anyone can show me how to display:
Member Name IsOnline
in a grid view. or anything like that. let me know...maybe i should use a different control? my thanks in advance
|

February 26th, 2009, 07:01 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2008
Location: So Cal is good enough for you, California, USA.
Posts: 133
Thanks: 15
Thanked 1 Time in 1 Post
|
|
oops. this isnt a new thread... my bad
|

February 26th, 2009, 07:02 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 165 Times in 162 Posts
|
|
Iceman,
I might suggest you post this question in a new thread, rather than sticking it in a totally unrelated thread like this. More people will see it that way.
|

February 26th, 2009, 07:14 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2008
Location: So Cal is good enough for you, California, USA.
Posts: 133
Thanks: 15
Thanked 1 Time in 1 Post
|
|
i know i know... i minimized the window and forgot where i was at... i thought i was making a thread but i was looking up the answer to his question.
use:
<%@ Page Language="C#" AutoEventWireUp="true" CodeFile="FirstPageCodeBehind.aspx.cs" Inherits=classname %>
Code File is self explanitory but Inherits links you to the class in the code file. just type a class name.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |