Saturday, March 31, 2012

Silly Question about aspnet_client

Hi we are running a 2003 web Server... When we installed asp.net on the server it added to aspnet_client folder to the existing clients on that server.

When we create new clients there is no aspnet_client folder... Is the fix as simple as copying and pasting the folder into the clients directory? Or should this be setup somewhere else? If so please explain where? Still new at this process so please keep it basic...

Thanks!

AnjariBump!
That folder just contains javascript that may or may not be needed by your application so you can just copy it and it should work fine.
Is there a difference between copying the folder to each site vs. creating a virtual directory to the aspnet_client folder (located in the "Default Web Site") in each site.

I am new to all this web stuff ;)
Theres no need to make it a virtual directory. Should work fine if you just copy it over.

Silly question I think

I have a web site with 2 virtual directories :

In one of the pages in one of the virtual directories (for ex vdir1) I need to POST to another page in the other virtual directory (for ex vdir2).

I did this with the WebClient class and it works fine - it's just I have to hardcode the whole URL of the other virtual directory - (exhttp://www.mysite.com/vdir2/test.aspx). I was wondering if I could avoid this since the virtual directory is in the same web site and web server.

Any ideas ?

well if you have two directories that is in the same root you could use something like the ../ expression to back up and or move forward as per your needs.

example:

directory1: mysite.com/my_first_folder/firstpage.aspx

directory2: mysite.com/my_second_folder/secondpage.aspx

to get from directory2 to myfirstpage.aspx in directory1 folder, i might use something like: ../my_first_folder/firstpage.aspx

hope this helps.

Silly question about XHTML

I think I'm having a dim day and should just go back to bed, but alas, I can
t
do that...
I'm writing a peice of code to create XHTML compliant documents using
System.IO, there's probably an easier way but anyway... my code works fine,
and it saves a file as an XML file. If I load this in IE, I get the xml
code!! (rather than the page it should generate). If I rename the file to
.xhtml, IE wont load it and I get the "choose program/service" dialog.
What am I doing wrong!?
Cheers, Dan.
Here's the generated xhtml..
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test XHTML Page</title>
<link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=test.css" />
</head>
</html>
---I think you may be simply misunderstanding what IE would do with a file with
an extension of xml. It will load it and parse it as xml. If you try the
same document with an xml extension in firefox you will find it is displayed
as xhtml.
Try the document with an htm extension and it will load into IE perfectly.
If you want to keep it as a file with an xml extension then your going to
have to format it with an xsl stylesheet rather than expect the thml parser
to pick it up.
Regards
John Timney
Microsoft MVP
"musosdev" <musoswire@.community.nospam> wrote in message
news:8EEEBD74-3542-40D3-B06E-9EC6482B9B55@.microsoft.com...
>I think I'm having a dim day and should just go back to bed, but alas, I
>cant
> do that...
> I'm writing a peice of code to create XHTML compliant documents using
> System.IO, there's probably an easier way but anyway... my code works
> fine,
> and it saves a file as an XML file. If I load this in IE, I get the xml
> code!! (rather than the page it should generate). If I rename the file to
> .xhtml, IE wont load it and I get the "choose program/service" dialog.
> What am I doing wrong!?
> Cheers, Dan.
> Here's the generated xhtml..
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> <head>
> <title>Test XHTML Page</title>
> <link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=test.css" />
> </head>
> </html>
> ---
Cheers John, that makes a lot more sense - can you point me in the direction
of any tutorials on XSLT stylesheets?
Cheers
Dan
"John Timney ( MVP )" wrote:

> I think you may be simply misunderstanding what IE would do with a file wi
th
> an extension of xml. It will load it and parse it as xml. If you try the
> same document with an xml extension in firefox you will find it is display
ed
> as xhtml.
> Try the document with an htm extension and it will load into IE perfectly.
> If you want to keep it as a file with an xml extension then your going to
> have to format it with an xsl stylesheet rather than expect the thml parse
r
> to pick it up.
> --
> Regards
> John Timney
> Microsoft MVP
> "musosdev" <musoswire@.community.nospam> wrote in message
> news:8EEEBD74-3542-40D3-B06E-9EC6482B9B55@.microsoft.com...
>
>
Also, there are some good XML standard references in MSDN library, here is
the web link:
#XML Standards Reference
http://msdn.microsoft.com/library/e...c9d0-423a-a00f-
672e855de401.asp?frame=true
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
| From: "John Timney \( MVP \)" <timneyj@.despammed.com>
| References: <8EEEBD74-3542-40D3-B06E-9EC6482B9B55@.microsoft.com>
<umlIK0CHGHA.2212@.TK2MSFTNGP15.phx.gbl>
<4EFA50EC-08F6-4339-8355-6AFBA7052DE2@.microsoft.com>
| Subject: Re: Silly question about XHTML
| Date: Wed, 18 Jan 2006 17:01:03 -0000
| Lines: 79
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <eHJnU8EHGHA.140@.TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 81.168.102.157
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:371796
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| http://www.w3schools.com/xsl/xsl_transformation.asp
|
| Got some good and very simple examples here
|
| --
| Regards
|
| John Timney
| Microsoft MVP
|
| "musosdev" <musoswire@.community.nospam> wrote in message
| news:4EFA50EC-08F6-4339-8355-6AFBA7052DE2@.microsoft.com...
| > Cheers John, that makes a lot more sense - can you point me in the
| > direction
| > of any tutorials on XSLT stylesheets?
| >
| > Cheers
| >
| >
| > Dan
| >
| > "John Timney ( MVP )" wrote:
| >
| >> I think you may be simply misunderstanding what IE would do with a
file
| >> with
| >> an extension of xml. It will load it and parse it as xml. If you try
| >> the
| >> same document with an xml extension in firefox you will find it is
| >> displayed
| >> as xhtml.
| >>
| >> Try the document with an htm extension and it will load into IE
| >> perfectly.
| >> If you want to keep it as a file with an xml extension then your going
to
| >> have to format it with an xsl stylesheet rather than expect the thml
| >> parser
| >> to pick it up.
| >>
| >> --
| >> Regards
| >>
| >> John Timney
| >> Microsoft MVP
| >>
| >> "musosdev" <musoswire@.community.nospam> wrote in message
| >> news:8EEEBD74-3542-40D3-B06E-9EC6482B9B55@.microsoft.com...
| >> >I think I'm having a dim day and should just go back to bed, but
alas, I
| >> >cant
| >> > do that...
| >> >
| >> > I'm writing a peice of code to create XHTML compliant documents using
| >> > System.IO, there's probably an easier way but anyway... my code works
| >> > fine,
| >> > and it saves a file as an XML file. If I load this in IE, I get the
xml
| >> > code!! (rather than the page it should generate). If I rename the
file
| >> > to
| >> > .xhtml, IE wont load it and I get the "choose program/service"
dialog.
| >> >
| >> > What am I doing wrong!?
| >> >
| >> > Cheers, Dan.
| >> >
| >> > Here's the generated xhtml..
| >> >
| >> > <?xml version="1.0" encoding="UTF-8" ?>
| >> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| >> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
| >> > <head>
| >> > <title>Test XHTML Page</title>
| >> > <link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=test.css" />
| >> > </head>
| >> > </html>
| >> > ---
| >>
| >>
| >>
|
|
|
http://www.w3schools.com/xsl/xsl_transformation.asp
Got some good and very simple examples here
Regards
John Timney
Microsoft MVP
"musosdev" <musoswire@.community.nospam> wrote in message
news:4EFA50EC-08F6-4339-8355-6AFBA7052DE2@.microsoft.com...
> Cheers John, that makes a lot more sense - can you point me in the
> direction
> of any tutorials on XSLT stylesheets?
> Cheers
>
> Dan
> "John Timney ( MVP )" wrote:
>

Silly question about XHTML

I think I'm having a dim day and should just go back to bed, but alas, I cant
do that...

I'm writing a peice of code to create XHTML compliant documents using
System.IO, there's probably an easier way but anyway... my code works fine,
and it saves a file as an XML file. If I load this in IE, I get the xml
code!! (rather than the page it should generate). If I rename the file to
..xhtml, IE wont load it and I get the "choose program/service" dialog.

What am I doing wrong!?

Cheers, Dan.

Here's the generated xhtml..

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test XHTML Page</title>
<link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=test.css" />
</head>
</html>
--------------I think you may be simply misunderstanding what IE would do with a file with
an extension of xml. It will load it and parse it as xml. If you try the
same document with an xml extension in firefox you will find it is displayed
as xhtml.

Try the document with an htm extension and it will load into IE perfectly.
If you want to keep it as a file with an xml extension then your going to
have to format it with an xsl stylesheet rather than expect the thml parser
to pick it up.

--
Regards

John Timney
Microsoft MVP

"musosdev" <musoswire@.community.nospam> wrote in message
news:8EEEBD74-3542-40D3-B06E-9EC6482B9B55@.microsoft.com...
>I think I'm having a dim day and should just go back to bed, but alas, I
>cant
> do that...
> I'm writing a peice of code to create XHTML compliant documents using
> System.IO, there's probably an easier way but anyway... my code works
> fine,
> and it saves a file as an XML file. If I load this in IE, I get the xml
> code!! (rather than the page it should generate). If I rename the file to
> .xhtml, IE wont load it and I get the "choose program/service" dialog.
> What am I doing wrong!?
> Cheers, Dan.
> Here's the generated xhtml..
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> <head>
> <title>Test XHTML Page</title>
> <link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=test.css" />
> </head>
> </html>
> --------------
Cheers John, that makes a lot more sense - can you point me in the direction
of any tutorials on XSLT stylesheets?

Cheers

Dan

"John Timney ( MVP )" wrote:

> I think you may be simply misunderstanding what IE would do with a file with
> an extension of xml. It will load it and parse it as xml. If you try the
> same document with an xml extension in firefox you will find it is displayed
> as xhtml.
> Try the document with an htm extension and it will load into IE perfectly.
> If you want to keep it as a file with an xml extension then your going to
> have to format it with an xsl stylesheet rather than expect the thml parser
> to pick it up.
> --
> Regards
> John Timney
> Microsoft MVP
> "musosdev" <musoswire@.community.nospam> wrote in message
> news:8EEEBD74-3542-40D3-B06E-9EC6482B9B55@.microsoft.com...
> >I think I'm having a dim day and should just go back to bed, but alas, I
> >cant
> > do that...
> > I'm writing a peice of code to create XHTML compliant documents using
> > System.IO, there's probably an easier way but anyway... my code works
> > fine,
> > and it saves a file as an XML file. If I load this in IE, I get the xml
> > code!! (rather than the page it should generate). If I rename the file to
> > .xhtml, IE wont load it and I get the "choose program/service" dialog.
> > What am I doing wrong!?
> > Cheers, Dan.
> > Here's the generated xhtml..
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> > <head>
> > <title>Test XHTML Page</title>
> > <link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=test.css" />
> > </head>
> > </html>
> > --------------
>
http://www.w3schools.com/xsl/xsl_transformation.asp

Got some good and very simple examples here

--
Regards

John Timney
Microsoft MVP

"musosdev" <musoswire@.community.nospam> wrote in message
news:4EFA50EC-08F6-4339-8355-6AFBA7052DE2@.microsoft.com...
> Cheers John, that makes a lot more sense - can you point me in the
> direction
> of any tutorials on XSLT stylesheets?
> Cheers
>
> Dan
> "John Timney ( MVP )" wrote:
>> I think you may be simply misunderstanding what IE would do with a file
>> with
>> an extension of xml. It will load it and parse it as xml. If you try
>> the
>> same document with an xml extension in firefox you will find it is
>> displayed
>> as xhtml.
>>
>> Try the document with an htm extension and it will load into IE
>> perfectly.
>> If you want to keep it as a file with an xml extension then your going to
>> have to format it with an xsl stylesheet rather than expect the thml
>> parser
>> to pick it up.
>>
>> --
>> Regards
>>
>> John Timney
>> Microsoft MVP
>>
>> "musosdev" <musoswire@.community.nospam> wrote in message
>> news:8EEEBD74-3542-40D3-B06E-9EC6482B9B55@.microsoft.com...
>> >I think I'm having a dim day and should just go back to bed, but alas, I
>> >cant
>> > do that...
>>> > I'm writing a peice of code to create XHTML compliant documents using
>> > System.IO, there's probably an easier way but anyway... my code works
>> > fine,
>> > and it saves a file as an XML file. If I load this in IE, I get the xml
>> > code!! (rather than the page it should generate). If I rename the file
>> > to
>> > .xhtml, IE wont load it and I get the "choose program/service" dialog.
>>> > What am I doing wrong!?
>>> > Cheers, Dan.
>>> > Here's the generated xhtml..
>>> > <?xml version="1.0" encoding="UTF-8" ?>
>> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
>> > <head>
>> > <title>Test XHTML Page</title>
>> > <link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=test.css" />
>> > </head>
>> > </html>
>> > --------------
>>
>>
>
Also, there are some good XML standard references in MSDN library, here is
the web link:

#XML Standards Reference
http://msdn.microsoft.com/library/e...c9d0-423a-a00f-
672e855de401.asp?frame=true

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

-------
| From: "John Timney \( MVP \)" <timneyj@.despammed.com>
| References: <8EEEBD74-3542-40D3-B06E-9EC6482B9B55@.microsoft.com>
<umlIK0CHGHA.2212@.TK2MSFTNGP15.phx.gbl>
<4EFA50EC-08F6-4339-8355-6AFBA7052DE2@.microsoft.com>
| Subject: Re: Silly question about XHTML
| Date: Wed, 18 Jan 2006 17:01:03 -0000
| Lines: 79
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <eHJnU8EHGHA.140@.TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 81.168.102.157
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:371796
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| http://www.w3schools.com/xsl/xsl_transformation.asp
|
| Got some good and very simple examples here
|
| --
| Regards
|
| John Timney
| Microsoft MVP
|
| "musosdev" <musoswire@.community.nospam> wrote in message
| news:4EFA50EC-08F6-4339-8355-6AFBA7052DE2@.microsoft.com...
| > Cheers John, that makes a lot more sense - can you point me in the
| > direction
| > of any tutorials on XSLT stylesheets?
| >
| > Cheers
| >
| >
| > Dan
| >
| > "John Timney ( MVP )" wrote:
| >
| >> I think you may be simply misunderstanding what IE would do with a
file
| >> with
| >> an extension of xml. It will load it and parse it as xml. If you try
| >> the
| >> same document with an xml extension in firefox you will find it is
| >> displayed
| >> as xhtml.
| >>
| >> Try the document with an htm extension and it will load into IE
| >> perfectly.
| >> If you want to keep it as a file with an xml extension then your going
to
| >> have to format it with an xsl stylesheet rather than expect the thml
| >> parser
| >> to pick it up.
| >>
| >> --
| >> Regards
| >>
| >> John Timney
| >> Microsoft MVP
| >>
| >> "musosdev" <musoswire@.community.nospam> wrote in message
| >> news:8EEEBD74-3542-40D3-B06E-9EC6482B9B55@.microsoft.com...
| >> >I think I'm having a dim day and should just go back to bed, but
alas, I
| >> >cant
| >> > do that...
| >| >> > I'm writing a peice of code to create XHTML compliant documents using
| >> > System.IO, there's probably an easier way but anyway... my code works
| >> > fine,
| >> > and it saves a file as an XML file. If I load this in IE, I get the
xml
| >> > code!! (rather than the page it should generate). If I rename the
file
| >> > to
| >> > .xhtml, IE wont load it and I get the "choose program/service"
dialog.
| >| >> > What am I doing wrong!?
| >| >> > Cheers, Dan.
| >| >> > Here's the generated xhtml..
| >| >> > <?xml version="1.0" encoding="UTF-8" ?>
| >> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
| >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| >> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
| >> > <head>
| >> > <title>Test XHTML Page</title>
| >> > <link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=test.css" />
| >> > </head>
| >> > </html>
| >> > --------------
| >>
| >>
| >>
|
|
|

Silly question...

How can take the result of a Sql query and put it in a text field?

IIRC, not directly...as it's not text that's returned, it's Data. You would have to loop the data, appending it to your textbox. I have a feeling this isn't what you mean though...

What is it you are after though? Errors? Record Counts? Etc....


Well, just the data really. I'm trying to make a...well, I don't really know how to describe it... I'm trying to make my own form to edit data in a database: I can't seem to configure the GridView or the FormView exactly to my liking. I have two fields that correspond to columns in my table that I want to be able to edit; one is a title (varchar(50)) and the other is paragraph(s) of XML formatted text (varchar(MAX)). I have about 10 or 11 rows of data that I want to be able to edit, and I need to be able to have the textfields where the user enters in the data to be able to write the XML back to the database. (I need the XML since I'll have links inside the paragraphs that I'm entering). I can get GridView to list all the rows, but the edit fields are too limited (small) to edit paragraph effectively, and the FormView only lists one row at a time, which I also don't want (I don't want the user to have to page through each row until they find the one they want to edit).

I admit I'm a bit of a newbie at working with databases, and I've only just recently started learning ASP.NET, so my knowledge in how to tackle these problems are limited. Is this the best way to go about what I want to accomplish? Or is there a better way? Thanks for the feedback!!!


Here's how I managed to put a SQL result into TextBox1.

Basically, I'm counting the number of rows in a table called, tbl_Count. e.g. select count(id) as iCount from tbl_Count

Make sure you already have a connection string called, "MyConnectionString" in you web.config file and you can pretty much change the query to fit your needs.


// Make sure to import the following.

using System.Data;
using System.Data.SqlClient;
using System.Configuration;

// Start declaring the variables

string connString = ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString;
SqlConnection conn = new SqlConnection(connString);
SqlCommand cmd = new SqlCommand();
SqlDataReader reader;
string strQuery = "select count(id) as iCount from tbl_Count";

// Run the query and dump the value into TextBox1

cmd.CommandText = strQuery;
cmd.Connection = conn;
conn.Open();
reader = cmd.ExecuteReader();
reader.Read();
TextBox1.Text = Convert.ToString(reader.GetValue(0));

// Close all connections

reader.Close();
conn.Close();

Hope it helps.


Yeah, that's exactly what I was looking for...sweet, thanks!

silverlight

its good to see but where is the software to download and try

i went to site silverlight.net

it says to download something

no templates in my IDE

I think you should find everything you need here..
http://silverlight.net/GetStarted/Default.aspx

some quickstart tutorials can be found here...
http://silverlight.net/quickstarts/silverlight10/default.aspx

You can also find a pretty good introduction here (It also used Visual Web Developer and/or VS 2005)
http://msdn.microsoft.com/msdnmag/issues/07/06/Silverlight/default.aspx

Hope that helps.

silverlight

What is silver light its a flash player or what.

Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of .NET-based media experiences and rich interactive applications (RIAs) for the Web. As of now it is supported on windows and Mac and supportivity for Linux is also under process.