Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Thursday, March 29, 2012

Newbie: How to display search results?

I am new to ASP.NET, so probably my question is very basic:

I have a web page (page1) where I allow the user to make a search, text box
plus a botton (botton1).
When he click the botton (button1), the server obtain (from memory) an array
of Products Id.
I want to open a second web page (page 2) with the results (obtained from a
database using the Products Id), the results will be shown in a datagrid.

My question:
- If Once I clicked botton1 I retrieve from de database the Products (using
the array of ProductsId and a datareader) how I bound this datareader to the
datagrid in page2?.
- I think there is a second option: I pass the array (memory array) of
products Id to Page2 (how i do it?) and the Onload event of Page2 read the
data from the database and show it in the datagrid. How I pass the memory
array to Onload event of Page2?.

I am pretty new to ASP.NET so I suspect there is an standard way of doing
this, I welcome any suggestion.

Thanks,

JaimeI am new to ASP.NET, so probably my question is very basic:

Quote:

Originally Posted by

>
I have a web page (page1) where I allow the user to make a search, text box
plus a botton (botton1).
When he click the botton (button1), the server obtain (from memory) an array
of Products Id.
I want to open a second web page (page 2) with the results (obtained from a
database using the Products Id), the results will be shown in a datagrid.
>


By "open a second page", do you mean "open in a new window", or just
"replace the current page"? If new window, then see if there is a
"target" attribute on that button (button1). If current page, then
nothing special needs to be done.

Quote:

Originally Posted by

My question:
- If Once I clicked botton1 I retrieve from de database the Products (using
the array of ProductsId and a datareader) how I bound this datareader to the
datagrid in page2?.
- I think there is a second option: I pass the array (memory array) of
products Id to Page2 (how i do it?) and the Onload event of Page2 read the
data from the database and show it in the datagrid. How I pass the memory
array to Onload event of Page2?.
>
I am pretty new to ASP.NET so I suspect there is an standard way of doing
this, I welcome any suggestion.
>
Thanks,
>
Jaime


To switch from one page to another, you can use "Response.Redirect()",
using the new url as a parameter.

To pass data from one page to another, there are several options:
- querystring, like "page2.aspx?searchtext=bla". Best for a small list
of short values, that can be represented by a string.
- Session data. In page1 you store "it" in the session
(Session["productids"] = list) and in page2 you read it, casting as
required ( int[] list = (int[])Session["productids"] )

You can perform the search in page1, passing the results (via Session)
to page2. Or you can pass the searchtext to page2 (session or
querystring), where the complete search is performed. I like the second
option better, as you concentrate the "search functionality" in that
page.

Hans Kesting

newbie: image problems again

hey

asp.net 2.0

my problem is that on a webpage am I trying to dynamically display the image
a user has uploaded. But the webpage doesn't display the image. The browser
displays the standard image telling that image not found / broken image link
etc...

This is the code which saves the image to hard drive...:
fullsizeImage.Save(Server.MapPath("~/Images/Fullsize/" + Profile.UserName +
".jpeg"));

This is my code for displaying the image, it's in Page_Load event of
webpage:
imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/" + Profile.UserName
+ ".jpeg");

The image exist in that folder

Any suggestions to this error?

JeffHi Jeff,

does this variable "Profile.UserName" really exist when you try to load the
image. Did you place an exception-handler around the loading-method?

Bye,

--
Matthias Pieroth
www.codegod.de - The Page for .NET-developers

"Jeff" <it_consultant1@.hotmail.com.NOSPAMwrote in message
news:%23qlAzL5nGHA.1808@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

hey
>
asp.net 2.0
>
my problem is that on a webpage am I trying to dynamically display the
image a user has uploaded. But the webpage doesn't display the image. The
browser displays the standard image telling that image not found / broken
image link etc...
>
This is the code which saves the image to hard drive...:
fullsizeImage.Save(Server.MapPath("~/Images/Fullsize/" + Profile.UserName
+ ".jpeg"));
>
This is my code for displaying the image, it's in Page_Load event of
webpage:
imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/" +
Profile.UserName + ".jpeg");
>
The image exist in that folder
>
Any suggestions to this error?
>
Jeff
>


Hey

it looks like Profile.UserName is empty...
But this code doesn't work either:
imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/test.jpeg");

I've also tryed this (setting it directly in the source, not the code
behind):
src='<%# Eval("~/Images/Fullsize/test.jpeg") %>'
Without any success...

any suggestions?

Jeff

"Matthias Pieroth" <piermat2001@.yahoo.dewrote in message
news:e8elch$p0k$02$1@.news.t-online.com...

Quote:

Originally Posted by

Hi Jeff,
>
does this variable "Profile.UserName" really exist when you try to load
the image. Did you place an exception-handler around the loading-method?
>
Bye,
>
--
Matthias Pieroth
www.codegod.de - The Page for .NET-developers
>
>
"Jeff" <it_consultant1@.hotmail.com.NOSPAMwrote in message
news:%23qlAzL5nGHA.1808@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

>hey
>>
>asp.net 2.0
>>
>my problem is that on a webpage am I trying to dynamically display the
>image a user has uploaded. But the webpage doesn't display the image. The
>browser displays the standard image telling that image not found / broken
>image link etc...
>>
>This is the code which saves the image to hard drive...:
>fullsizeImage.Save(Server.MapPath("~/Images/Fullsize/" + Profile.UserName
>+ ".jpeg"));
>>
>This is my code for displaying the image, it's in Page_Load event of
>webpage:
>imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/" +
>Profile.UserName + ".jpeg");
>>
>The image exist in that folder
>>
>Any suggestions to this error?
>>
>Jeff
>>


>
>


Hi Jeff,

I am not sure what your problem is, but try one of these two things:
1. If you are using something like VS.Net, then simply try to locate a
test image using the properties grid of the Image Control. And then try
to run your page and see if it works.

2. try printing the path you are trying to assign to the ImageUrl
property by using a Response.Write() from the code behind.
So basically Response.Write(Server.MapPath("~\....

I have a feeling you are doing a bit too much in trying to assign a
path to the ImageUrl property.

- V

Jeff wrote:

Quote:

Originally Posted by

Hey
>
it looks like Profile.UserName is empty...
But this code doesn't work either:
imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/test.jpeg");
>
I've also tryed this (setting it directly in the source, not the code
behind):
src='<%# Eval("~/Images/Fullsize/test.jpeg") %>'
Without any success...
>
any suggestions?
>
Jeff
>
>
"Matthias Pieroth" <piermat2001@.yahoo.dewrote in message
news:e8elch$p0k$02$1@.news.t-online.com...

Quote:

Originally Posted by

Hi Jeff,

does this variable "Profile.UserName" really exist when you try to load
the image. Did you place an exception-handler around the loading-method?

Bye,

--
Matthias Pieroth
www.codegod.de - The Page for .NET-developers

"Jeff" <it_consultant1@.hotmail.com.NOSPAMwrote in message
news:%23qlAzL5nGHA.1808@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

hey
>
asp.net 2.0
>
my problem is that on a webpage am I trying to dynamically display the
image a user has uploaded. But the webpage doesn't display the image. The
browser displays the standard image telling that image not found / broken
image link etc...
>
This is the code which saves the image to hard drive...:
fullsizeImage.Save(Server.MapPath("~/Images/Fullsize/" + Profile.UserName
+ ".jpeg"));
>
This is my code for displaying the image, it's in Page_Load event of
webpage:
imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/" +
Profile.UserName + ".jpeg");
>
The image exist in that folder
>
Any suggestions to this error?
>
Jeff
>



The path is
C:\Documents and Settings\Jeff\My Documents\Visual Studio
2005\WebSites\BN\Images\Fullsize\test.jpeg

I've checked and path is correct, but the path contains spaces...

I'm not sure about it but maybe the browser need to know if this is a
picture ("image/thumb")?

Jeff

"V" <vaibhav.gadodia@.gmail.comwrote in message
news:1152051114.522719.324780@.a14g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

Hi Jeff,
>
I am not sure what your problem is, but try one of these two things:
1. If you are using something like VS.Net, then simply try to locate a
test image using the properties grid of the Image Control. And then try
to run your page and see if it works.
>
2. try printing the path you are trying to assign to the ImageUrl
property by using a Response.Write() from the code behind.
So basically Response.Write(Server.MapPath("~\....
>
I have a feeling you are doing a bit too much in trying to assign a
path to the ImageUrl property.
>
- V
>
Jeff wrote:

Quote:

Originally Posted by

>Hey
>>
>it looks like Profile.UserName is empty...
>But this code doesn't work either:
>imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/test.jpeg");
>>
>I've also tryed this (setting it directly in the source, not the code
>behind):
>src='<%# Eval("~/Images/Fullsize/test.jpeg") %>'
>Without any success...
>>
>any suggestions?
>>
>Jeff
>>
>>
>"Matthias Pieroth" <piermat2001@.yahoo.dewrote in message
>news:e8elch$p0k$02$1@.news.t-online.com...

Quote:

Originally Posted by

Hi Jeff,
>
does this variable "Profile.UserName" really exist when you try to load
the image. Did you place an exception-handler around the
loading-method?
>
Bye,
>
--
Matthias Pieroth
www.codegod.de - The Page for .NET-developers
>
>
"Jeff" <it_consultant1@.hotmail.com.NOSPAMwrote in message
news:%23qlAzL5nGHA.1808@.TK2MSFTNGP02.phx.gbl...
>hey
>>
>asp.net 2.0
>>
>my problem is that on a webpage am I trying to dynamically display the
>image a user has uploaded. But the webpage doesn't display the image.
>The
>browser displays the standard image telling that image not found /
>broken
>image link etc...
>>
>This is the code which saves the image to hard drive...:
>fullsizeImage.Save(Server.MapPath("~/Images/Fullsize/" +
>Profile.UserName
>+ ".jpeg"));
>>
>This is my code for displaying the image, it's in Page_Load event of
>webpage:
>imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/" +
>Profile.UserName + ".jpeg");
>>
>The image exist in that folder
>>
>Any suggestions to this error?
>>
>Jeff
>>
>
>


>


It is possible that you may need to grant permission to the asp.net
process on that image directory. It might be a problem with the
security.

- V
Jeff wrote:

Quote:

Originally Posted by

The path is
C:\Documents and Settings\Jeff\My Documents\Visual Studio
2005\WebSites\BN\Images\Fullsize\test.jpeg
>
I've checked and path is correct, but the path contains spaces...
>
I'm not sure about it but maybe the browser need to know if this is a
picture ("image/thumb")?
>
>
>
>
Jeff
>
>
>
>
>
"V" <vaibhav.gadodia@.gmail.comwrote in message
news:1152051114.522719.324780@.a14g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

Hi Jeff,

I am not sure what your problem is, but try one of these two things:
1. If you are using something like VS.Net, then simply try to locate a
test image using the properties grid of the Image Control. And then try
to run your page and see if it works.

2. try printing the path you are trying to assign to the ImageUrl
property by using a Response.Write() from the code behind.
So basically Response.Write(Server.MapPath("~\....

I have a feeling you are doing a bit too much in trying to assign a
path to the ImageUrl property.

- V

Jeff wrote:

Quote:

Originally Posted by

Hey
>
it looks like Profile.UserName is empty...
But this code doesn't work either:
imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/test.jpeg");
>
I've also tryed this (setting it directly in the source, not the code
behind):
src='<%# Eval("~/Images/Fullsize/test.jpeg") %>'
Without any success...
>
any suggestions?
>
Jeff
>
>
"Matthias Pieroth" <piermat2001@.yahoo.dewrote in message
news:e8elch$p0k$02$1@.news.t-online.com...
Hi Jeff,

does this variable "Profile.UserName" really exist when you try to load
the image. Did you place an exception-handler around the
loading-method?

Bye,

--
Matthias Pieroth
www.codegod.de - The Page for .NET-developers

"Jeff" <it_consultant1@.hotmail.com.NOSPAMwrote in message
news:%23qlAzL5nGHA.1808@.TK2MSFTNGP02.phx.gbl...
hey
>
asp.net 2.0
>
my problem is that on a webpage am I trying to dynamically display the
image a user has uploaded. But the webpage doesn't display the image.
The
browser displays the standard image telling that image not found /
broken
image link etc...
>
This is the code which saves the image to hard drive...:
fullsizeImage.Save(Server.MapPath("~/Images/Fullsize/" +
Profile.UserName
+ ".jpeg"));
>
This is my code for displaying the image, it's in Page_Load event of
webpage:
imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/" +
Profile.UserName + ".jpeg");
>
The image exist in that folder
>
Any suggestions to this error?
>
Jeff
>



I replaced this line:

imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/test.jpeg");

with this line

imgPicture.ImageUrl = "~/Images/Fullsize/test.jpeg";

And now it works

Thank you very much for helping me with this. The best thing with this
problem is that I've learned from it -maybe using Server.MapPath isn't
best all the times...

Best Regards!

Jeff

"V" <vaibhav.gadodia@.gmail.comwrote in message
news:1152057813.849114.308260@.m73g2000cwd.googlegr oups.com...

Quote:

Originally Posted by

It is possible that you may need to grant permission to the asp.net
process on that image directory. It might be a problem with the
security.
>
- V
Jeff wrote:

Quote:

Originally Posted by

>The path is
>C:\Documents and Settings\Jeff\My Documents\Visual Studio
>2005\WebSites\BN\Images\Fullsize\test.jpeg
>>
>I've checked and path is correct, but the path contains spaces...
>>
>I'm not sure about it but maybe the browser need to know if this is a
>picture ("image/thumb")?
>>
>>
>>
>>
>Jeff
>>
>>
>>
>>
>>
>"V" <vaibhav.gadodia@.gmail.comwrote in message
>news:1152051114.522719.324780@.a14g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

Hi Jeff,
>
I am not sure what your problem is, but try one of these two things:
1. If you are using something like VS.Net, then simply try to locate a
test image using the properties grid of the Image Control. And then try
to run your page and see if it works.
>
2. try printing the path you are trying to assign to the ImageUrl
property by using a Response.Write() from the code behind.
So basically Response.Write(Server.MapPath("~\....
>
I have a feeling you are doing a bit too much in trying to assign a
path to the ImageUrl property.
>
- V
>
Jeff wrote:
>Hey
>>
>it looks like Profile.UserName is empty...
>But this code doesn't work either:
>imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/test.jpeg");
>>
>I've also tryed this (setting it directly in the source, not the code
>behind):
>src='<%# Eval("~/Images/Fullsize/test.jpeg") %>'
>Without any success...
>>
>any suggestions?
>>
>Jeff
>>
>>
>"Matthias Pieroth" <piermat2001@.yahoo.dewrote in message
>news:e8elch$p0k$02$1@.news.t-online.com...
Hi Jeff,
>
does this variable "Profile.UserName" really exist when you try to
load
the image. Did you place an exception-handler around the
loading-method?
>
Bye,
>
--
Matthias Pieroth
www.codegod.de - The Page for .NET-developers
>
>
"Jeff" <it_consultant1@.hotmail.com.NOSPAMwrote in message
news:%23qlAzL5nGHA.1808@.TK2MSFTNGP02.phx.gbl...
>hey
>>
>asp.net 2.0
>>
>my problem is that on a webpage am I trying to dynamically display
>the
>image a user has uploaded. But the webpage doesn't display the
>image.
>The
>browser displays the standard image telling that image not found /
>broken
>image link etc...
>>
>This is the code which saves the image to hard drive...:
>fullsizeImage.Save(Server.MapPath("~/Images/Fullsize/" +
>Profile.UserName
>+ ".jpeg"));
>>
>This is my code for displaying the image, it's in Page_Load event
>of
>webpage:
>imgPicture.ImageUrl = Server.MapPath("~/Images/Fullsize/" +
>Profile.UserName + ".jpeg");
>>
>The image exist in that folder
>>
>Any suggestions to this error?
>>
>Jeff
>>
>
>
>


>

Saturday, March 24, 2012

Newbie: Removing underline from Hyperlink

Hi,
I've added hyperlink objects to a web form & I would like to display them
without the underline. How can I do this?
The element in HTML appears to be <asp:Hyperlink

thus in a stylesheet:

asp:HyperLink
{
text-decoration:none
}

I tried to set this up in a stylesheet but no go.

How can i state a hyperlink object in a style sheet, or some other way to do
this?

Many thanks for any ideas on this

AntOn Sep 29, 10:13 am, Ant <A...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

Hi,
I've added hyperlink objects to a web form & I would like to display them
without the underline. How can I do this?
The element in HTML appears to be <asp:Hyperlink
>
thus in a stylesheet:
>
asp:HyperLink
{
text-decoration:none
>
}
>
I tried to set this up in a stylesheet but no go.
>
How can i state a hyperlink object in a style sheet, or some other way to do
this?
>
Many thanks for any ideas on this
>
Ant


for all links
a
{
text-decoration:none
}

per control

a.c1
{
text-decoration:none
}
...
<asp:HyperLink ... class="c1"...

Newbie: Save and display multi-value listbox... (VB.NET)

I have a list box (i.e. FieldA) that allows the user to select more than one option. When saved, this field content is inserted in a table.

My questions are:
- How do i loop through this listbox and save the data. Do i need to concatenate the selected options into a string before or during saving?
- When this saved record is retrieved from the table, do i need to do anything in order to display the options that have previously been selected and saved?
I appreciate any coding that you can provide to assist me...

Try this article, it was helpful to me when I dealt with this same issue.
http://www.developerfusion.co.uk/show/4653/

Newbie: text files

Sorry if this is a simple question. I have a bunch of text files that I am
allowing I want to display on my web page. When I do a response.writefile
to load the file the CRLFs don't work. How can show the contents of the
text file to the user easily?

Thanks
ChrisA CRLF does not render in the broswer as a break/line feed, you'll have to
read the file into a string var and replace crlf with "<BR>"... HTH

"Chris" wrote:

> Sorry if this is a simple question. I have a bunch of text files that I am
> allowing I want to display on my web page. When I do a response.writefile
> to load the file the CRLFs don't work. How can show the contents of the
> text file to the user easily?
> Thanks
> Chris
>
Dim sr As New System.IO.StreamReader("pathToFile")
response.write(sr.ReadToEnd)

"Chris" <NoSpam@.NoSpam.com> wrote in message
news:%23jD9X6bKFHA.132@.TK2MSFTNGP10.phx.gbl...
> Sorry if this is a simple question. I have a bunch of text files that I
> am allowing I want to display on my web page. When I do a
> response.writefile to load the file the CRLFs don't work. How can show
> the contents of the text file to the user easily?
> Thanks
> Chris
This solution has the same problem as using response.writefile. The CRLF
fields don't display.

Chris

"Scott M." <NoSpam@.NoSpam.com> wrote in message
news:uDBJJBcKFHA.3484@.TK2MSFTNGP12.phx.gbl...
> Dim sr As New System.IO.StreamReader("pathToFile")
> response.write(sr.ReadToEnd)
>
> "Chris" <NoSpam@.NoSpam.com> wrote in message
> news:%23jD9X6bKFHA.132@.TK2MSFTNGP10.phx.gbl...
>> Sorry if this is a simple question. I have a bunch of text files that I
>> am allowing I want to display on my web page. When I do a
>> response.writefile to load the file the CRLFs don't work. How can show
>> the contents of the text file to the user easily?
>>
>> Thanks
>> Chris
>>
"Chris" <NoSpam@.NoSpam.com> wrote in message
news:eLb9fIcKFHA.3916@.TK2MSFTNGP14.phx.gbl...
> This solution has the same problem as using response.writefile. The CRLF
> fields don't display.
> Chris
> "Scott M." <NoSpam@.NoSpam.com> wrote in message
> news:uDBJJBcKFHA.3484@.TK2MSFTNGP12.phx.gbl...
>> Dim sr As New System.IO.StreamReader("pathToFile")
>> response.write(sr.ReadToEnd)
>>
>>
>> "Chris" <NoSpam@.NoSpam.com> wrote in message
>> news:%23jD9X6bKFHA.132@.TK2MSFTNGP10.phx.gbl...
>>> Sorry if this is a simple question. I have a bunch of text files that I
>>> am allowing I want to display on my web page. When I do a
>>> response.writefile to load the file the CRLFs don't work. How can show
>>> the contents of the text file to the user easily?
>>>
>>> Thanks
>>> Chris
>>>
>>
>>

Dim sr As System.IO.StreamReader = New
System.IO.StreamReader("TextFile.txt")
Response.Write(sr.ReadToEnd().Replace(vbNewLine, "<br>")

Hope this helps :)

Mythran
As well as replacing the line breaks with <br /> tags you will want to
Server.HtmlEncode all of your text. Not doing so can cause security problems
if you allow people to upload files. Even if you don't allow people to
upload files, Html encoding the text is a good idea so that everything
displays correctly.

Newbie: text files

Sorry if this is a simple question. I have a bunch of text files that I am
allowing I want to display on my web page. When I do a response.writefile
to load the file the CRLFs don't work. How can show the contents of the
text file to the user easily?
Thanks
ChrisA CRLF does not render in the broswer as a break/line feed, you'll have to
read the file into a string var and replace crlf with "<BR>"... HTH
"Chris" wrote:

> Sorry if this is a simple question. I have a bunch of text files that I a
m
> allowing I want to display on my web page. When I do a response.writefile
> to load the file the CRLFs don't work. How can show the contents of the
> text file to the user easily?
> Thanks
> Chris
>
>
Dim sr As New System.IO.StreamReader("pathToFile")
response.write(sr.ReadToEnd)
"Chris" <NoSpam@.NoSpam.com> wrote in message
news:%23jD9X6bKFHA.132@.TK2MSFTNGP10.phx.gbl...
> Sorry if this is a simple question. I have a bunch of text files that I
> am allowing I want to display on my web page. When I do a
> response.writefile to load the file the CRLFs don't work. How can show
> the contents of the text file to the user easily?
> Thanks
> Chris
>
This solution has the same problem as using response.writefile. The CRLF
fields don't display.
Chris
"Scott M." <NoSpam@.NoSpam.com> wrote in message
news:uDBJJBcKFHA.3484@.TK2MSFTNGP12.phx.gbl...
> Dim sr As New System.IO.StreamReader("pathToFile")
> response.write(sr.ReadToEnd)
>
> "Chris" <NoSpam@.NoSpam.com> wrote in message
> news:%23jD9X6bKFHA.132@.TK2MSFTNGP10.phx.gbl...
>
"Chris" <NoSpam@.NoSpam.com> wrote in message
news:eLb9fIcKFHA.3916@.TK2MSFTNGP14.phx.gbl...
> This solution has the same problem as using response.writefile. The CRLF
> fields don't display.
> Chris
> "Scott M." <NoSpam@.NoSpam.com> wrote in message
> news:uDBJJBcKFHA.3484@.TK2MSFTNGP12.phx.gbl...
>
Dim sr As System.IO.StreamReader = New
System.IO.StreamReader("TextFile.txt")
Response.Write(sr.ReadToEnd().Replace(vbNewLine, "<br>")
Hope this helps :)
Mythran
As well as replacing the line breaks with <br /> tags you will want to
Server.HtmlEncode all of your text. Not doing so can cause security problem
s
if you allow people to upload files. Even if you don't allow people to
upload files, Html encoding the text is a good idea so that everything
displays correctly.

Newbie:please help me 'display' this on a simple .aspx page

I understand that store procedures are the recommended way to handle SQL
queries from an ASP application. However I am working on a small academic
assignment and I just need to get this over with. I created the store
procedure but now the teacher didn't accept that, as he is concerned he
would need to install the store procedure in Query Analyzer from his end.
Can you please clarify how I would be to do the following using a Select
Statement (VB.NET, ASP.NET 2.0):
Dim myNextPage
myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.
Dim myString
myString = "SELECT Employee From Pubs " _
& "WHERE job_id = " & TxtBox1.Text And
& "WHERE employee_name = " & TxtBox2.Text And
& "WHERE hire_date = " & TxtBox3.Text
'Now I want to:
If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
(hire_date = TxtBox3.Text) Then
Response.Redirect("myNextPage")
'Then on Next page I would like to display label.Text = "Your
information matched and I can go ahead to reset your password in AD..."
'However doing:
label.Text = "Your info matched and I can go ahead and reset your
password in AD..." ' This wouldn't work. Where do I need to put this
Label.Text ="..." ?
Else
Response.Redirect("myNextPage")
'Display on next page Label.Text = "The phrase(s) you typed didn't
match. Please click back button and resubmit info."
'If possible, I would like to display all phrases that did not match
in 'myNextPage', so that user would know which ones he didn't answer
correctly.
End If
End SubIn that case u may choose to write all logic of stored procedure in asp.net
itsself.
-jignesh
www.dotnetjini.com
"Marlon Brown" <marlon_brownj@.hotmail.com> wrote in message
news:e7u1sygJFHA.2772@.TK2MSFTNGP14.phx.gbl...
> I understand that store procedures are the recommended way to handle SQL
> queries from an ASP application. However I am working on a small academic
> assignment and I just need to get this over with. I created the store
> procedure but now the teacher didn't accept that, as he is concerned he
> would need to install the store procedure in Query Analyzer from his end.
> Can you please clarify how I would be to do the following using a Select
> Statement (VB.NET, ASP.NET 2.0):
>
> Dim myNextPage
> myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.
> Dim myString
> myString = "SELECT Employee From Pubs " _
> & "WHERE job_id = " & TxtBox1.Text And
> & "WHERE employee_name = " & TxtBox2.Text And
> & "WHERE hire_date = " & TxtBox3.Text
> 'Now I want to:
> If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
> (hire_date = TxtBox3.Text) Then
> Response.Redirect("myNextPage")
> 'Then on Next page I would like to display label.Text = "Your
> information matched and I can go ahead to reset your password in AD..."
> 'However doing:
> label.Text = "Your info matched and I can go ahead and reset your
> password in AD..." ' This wouldn't work. Where do I need to put this
> Label.Text ="..." ?
> Else
> Response.Redirect("myNextPage")
> 'Display on next page Label.Text = "The phrase(s) you typed didn't
> match. Please click back button and resubmit info."
> 'If possible, I would like to display all phrases that did not match
> in 'myNextPage', so that user would know which ones he didn't answer
> correctly.
> End If
> End Sub
>
Ok, if you can't show me the SQL part OK, but could you help me with on how
to display whatever variable I capture from the SQL query on .ASP.NET ?
I tried to use Response.Write(TextBox1.Text) but that didn't returned
satisfactory results. I understand I shouldn't use Response.Write and
therefore I attempted to create a Label1.Text to display whatever
information I got from SQL. The problem is that I do Label1.Text =
InfoFromSQL and that doesn't work either. It returns nothing on the
Label1.Text.
'Then on Next page I would like to display label.Text = "Your
'information matched and I can go ahead to reset your password in AD..."
' 'However doing:
' label.Text = "Your info matched and I can go ahead and reset your
' password in AD..." ' This wouldn't work. Where do I need to put this
' Label.Text ="..." ?
I am trying to
"Jignesh Desai" <jignesh_desai@.hotmail.com> wrote in message
news:O8z%238QhJFHA.2356@.TK2MSFTNGP14.phx.gbl...
> In that case u may choose to write all logic of stored procedure in
> asp.net
> itsself.
> -jignesh
> www.dotnetjini.com
> "Marlon Brown" <marlon_brownj@.hotmail.com> wrote in message
> news:e7u1sygJFHA.2772@.TK2MSFTNGP14.phx.gbl...
>
Labels do not produce actual HTML control on the client-side so have no way
to postback to the server. I believe you can store you texts in Session
variable.
Session["yourmsg"] = "Your info matched and I can go ahead and reset your
password in AD..."
Then in the other page:
label.Text = CStr(Session["yourmsg"])
You may use Session variable to store anything, including ArrayList and
access it on other pages in the same session. Just rememeber to CType it
back when you retrieve it.
"Marlon Brown" <marlon_brownj@.hotmail.com> bl
news:e7u1sygJFHA.2772@.TK2MSFTNGP14.phx.gbl g...
> I understand that store procedures are the recommended way to handle SQL
> queries from an ASP application. However I am working on a small academic
> assignment and I just need to get this over with. I created the store
> procedure but now the teacher didn't accept that, as he is concerned he
> would need to install the store procedure in Query Analyzer from his end.
> Can you please clarify how I would be to do the following using a Select
> Statement (VB.NET, ASP.NET 2.0):
>
> Dim myNextPage
> myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.
> Dim myString
> myString = "SELECT Employee From Pubs " _
> & "WHERE job_id = " & TxtBox1.Text And
> & "WHERE employee_name = " & TxtBox2.Text And
> & "WHERE hire_date = " & TxtBox3.Text
> 'Now I want to:
> If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
> (hire_date = TxtBox3.Text) Then
> Response.Redirect("myNextPage")
> 'Then on Next page I would like to display label.Text = "Your
> information matched and I can go ahead to reset your password in AD..."
> 'However doing:
> label.Text = "Your info matched and I can go ahead and reset your
> password in AD..." ' This wouldn't work. Where do I need to put this
> Label.Text ="..." ?
> Else
> Response.Redirect("myNextPage")
> 'Display on next page Label.Text = "The phrase(s) you typed didn't
> match. Please click back button and resubmit info."
> 'If possible, I would like to display all phrases that did not match
> in 'myNextPage', so that user would know which ones he didn't answer
> correctly.
> End If
> End Sub
>

Newbie:please help me display this on a simple .aspx page

I understand that store procedures are the recommended way to handle SQL
queries from an ASP application. However I am working on a small academic
assignment and I just need to get this over with. I created the store
procedure but now the teacher didn't accept that, as he is concerned he
would need to install the store procedure in Query Analyzer from his end.
Can you please clarify how I would be to do the following using a Select
Statement (VB.NET, ASP.NET 2.0):

Dim myNextPage
myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.

Dim myString
myString = "SELECT Employee From Pubs " _
& "WHERE job_id = " & TxtBox1.Text And
& "WHERE employee_name = " & TxtBox2.Text And
& "WHERE hire_date = " & TxtBox3.Text

'Now I want to:
If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
(hire_date = TxtBox3.Text) Then
Response.Redirect("myNextPage")
'Then on Next page I would like to display label.Text = "Your
information matched and I can go ahead to reset your password in AD..."
'However doing:
label.Text = "Your info matched and I can go ahead and reset your
password in AD..." ' This wouldn't work. Where do I need to put this
Label.Text ="..." ?

Else
Response.Redirect("myNextPage")
'Display on next page Label.Text = "The phrase(s) you typed didn't
match. Please click back button and resubmit info."
'If possible, I would like to display all phrases that did not match
in 'myNextPage', so that user would know which ones he didn't answer
correctly.

End If

End SubIn that case u may choose to write all logic of stored procedure in asp.net
itsself.

-jignesh
www.dotnetjini.com

"Marlon Brown" <marlon_brownj@.hotmail.com> wrote in message
news:e7u1sygJFHA.2772@.TK2MSFTNGP14.phx.gbl...
> I understand that store procedures are the recommended way to handle SQL
> queries from an ASP application. However I am working on a small academic
> assignment and I just need to get this over with. I created the store
> procedure but now the teacher didn't accept that, as he is concerned he
> would need to install the store procedure in Query Analyzer from his end.
> Can you please clarify how I would be to do the following using a Select
> Statement (VB.NET, ASP.NET 2.0):
>
> Dim myNextPage
> myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.
> Dim myString
> myString = "SELECT Employee From Pubs " _
> & "WHERE job_id = " & TxtBox1.Text And
> & "WHERE employee_name = " & TxtBox2.Text And
> & "WHERE hire_date = " & TxtBox3.Text
> 'Now I want to:
> If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
> (hire_date = TxtBox3.Text) Then
> Response.Redirect("myNextPage")
> 'Then on Next page I would like to display label.Text = "Your
> information matched and I can go ahead to reset your password in AD..."
> 'However doing:
> label.Text = "Your info matched and I can go ahead and reset your
> password in AD..." ' This wouldn't work. Where do I need to put this
> Label.Text ="..." ?
> Else
> Response.Redirect("myNextPage")
> 'Display on next page Label.Text = "The phrase(s) you typed didn't
> match. Please click back button and resubmit info."
> 'If possible, I would like to display all phrases that did not match
> in 'myNextPage', so that user would know which ones he didn't answer
> correctly.
> End If
> End Sub
Ok, if you can't show me the SQL part OK, but could you help me with on how
to display whatever variable I capture from the SQL query on .ASP.NET ?
I tried to use Response.Write(TextBox1.Text) but that didn't returned
satisfactory results. I understand I shouldn't use Response.Write and
therefore I attempted to create a Label1.Text to display whatever
information I got from SQL. The problem is that I do Label1.Text =
InfoFromSQL and that doesn't work either. It returns nothing on the
Label1.Text.

'Then on Next page I would like to display label.Text = "Your
'information matched and I can go ahead to reset your password in AD..."
' 'However doing:
' label.Text = "Your info matched and I can go ahead and reset your
' password in AD..." ' This wouldn't work. Where do I need to put this
' Label.Text ="..." ?

I am trying to
"Jignesh Desai" <jignesh_desai@.hotmail.com> wrote in message
news:O8z%238QhJFHA.2356@.TK2MSFTNGP14.phx.gbl...
> In that case u may choose to write all logic of stored procedure in
> asp.net
> itsself.
> -jignesh
> www.dotnetjini.com
> "Marlon Brown" <marlon_brownj@.hotmail.com> wrote in message
> news:e7u1sygJFHA.2772@.TK2MSFTNGP14.phx.gbl...
>> I understand that store procedures are the recommended way to handle SQL
>> queries from an ASP application. However I am working on a small academic
>> assignment and I just need to get this over with. I created the store
>> procedure but now the teacher didn't accept that, as he is concerned he
>> would need to install the store procedure in Query Analyzer from his end.
>> Can you please clarify how I would be to do the following using a Select
>> Statement (VB.NET, ASP.NET 2.0):
>>
>>
>>
>> Dim myNextPage
>> myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.
>>
>> Dim myString
>> myString = "SELECT Employee From Pubs " _
>> & "WHERE job_id = " & TxtBox1.Text And
>> & "WHERE employee_name = " & TxtBox2.Text
>> And
>> & "WHERE hire_date = " & TxtBox3.Text
>>
>> 'Now I want to:
>> If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
>> (hire_date = TxtBox3.Text) Then
>> Response.Redirect("myNextPage")
>> 'Then on Next page I would like to display label.Text = "Your
>> information matched and I can go ahead to reset your password in AD..."
>> 'However doing:
>> label.Text = "Your info matched and I can go ahead and reset your
>> password in AD..." ' This wouldn't work. Where do I need to put this
>> Label.Text ="..." ?
>>
>> Else
>> Response.Redirect("myNextPage")
>> 'Display on next page Label.Text = "The phrase(s) you typed didn't
>> match. Please click back button and resubmit info."
>> 'If possible, I would like to display all phrases that did not
>> match
>> in 'myNextPage', so that user would know which ones he didn't answer
>> correctly.
>>
>> End If
>>
>> End Sub
>>
>>
Labels do not produce actual HTML control on the client-side so have no way
to postback to the server. I believe you can store you texts in Session
variable.

Session["yourmsg"] = "Your info matched and I can go ahead and reset your
password in AD..."

Then in the other page:
label.Text = CStr(Session["yourmsg"])

You may use Session variable to store anything, including ArrayList and
access it on other pages in the same session. Just rememeber to CType it
back when you retrieve it.

"Marlon Brown" <marlon_brownj@.hotmail.com> bl
news:e7u1sygJFHA.2772@.TK2MSFTNGP14.phx.gbl g...
> I understand that store procedures are the recommended way to handle SQL
> queries from an ASP application. However I am working on a small academic
> assignment and I just need to get this over with. I created the store
> procedure but now the teacher didn't accept that, as he is concerned he
> would need to install the store procedure in Query Analyzer from his end.
> Can you please clarify how I would be to do the following using a Select
> Statement (VB.NET, ASP.NET 2.0):
>
> Dim myNextPage
> myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.
> Dim myString
> myString = "SELECT Employee From Pubs " _
> & "WHERE job_id = " & TxtBox1.Text And
> & "WHERE employee_name = " & TxtBox2.Text And
> & "WHERE hire_date = " & TxtBox3.Text
> 'Now I want to:
> If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
> (hire_date = TxtBox3.Text) Then
> Response.Redirect("myNextPage")
> 'Then on Next page I would like to display label.Text = "Your
> information matched and I can go ahead to reset your password in AD..."
> 'However doing:
> label.Text = "Your info matched and I can go ahead and reset your
> password in AD..." ' This wouldn't work. Where do I need to put this
> Label.Text ="..." ?
> Else
> Response.Redirect("myNextPage")
> 'Display on next page Label.Text = "The phrase(s) you typed didn't
> match. Please click back button and resubmit info."
> 'If possible, I would like to display all phrases that did not match
> in 'myNextPage', so that user would know which ones he didn't answer
> correctly.
> End If
> End Sub

Thursday, March 22, 2012

Newby/Novice Question: Printing Web Pages...

Hello, I have a question for the group.
My current project uses multiple panels to display the contents of a
web page. The thing is many of these panels are hidden while only one
is visible at a time (much like tabs). I use a set of command buttons
to switch between these panels. What I would like to do is to create a
print function that will create a preview showing all panels in
sequential order which could be used to print a hard copy.
Any suggestions?
TIA...The simple answer is: Use CSS to do the dirty work
You can set up different stylesheets for screen and print (an example
to follow)
BUT:
It all depends on your app
Is all your data easily available upfront? is there a lot of overhead
involved in fecthing data to be displayed on the other "tab"s
Are your clients on a low latency connection to the server?
EXAMPLE:
<STYLE type="text/css">
@.media print { .ScreenOnly { display: none; } }
@.media screen { .PrintOnly { display: none; }
.TabContentHidden { display: none; visibility: hidden; } }
</STYLE>
<DIV class="ScreenOnly" >This content will not be printed</DIV>
<DIV class="PrintOnly" >This content will not be visible on screen, but
<B>will</B> be printed</DIV>
<DIV class="TabContentHidden" >This is an invisible panel (but will
print)</DIV><DIV class="TabContent" >This is the visible panel (both
print and screen)</DIV>
<DIV class="TabContentHidden" >This is an invisible panel (but will
print)</DIV>
The other advantage to this approach is that you can switch "tabs" on
the browser without the server roundtrips (read near-instantaneous)
Hope this helps
-- addup --
Hmmm.
That looks interesting and might work if I had things setup "normally"
but that approch wouldn't work, I think. I am using ASPdotNET (i.e.
postbacks) to make the different panels/DIVs visible or not. If a
panel is not set as visible by the server it doesn't even show up on
the client side.
Private Sub btnPg1_Click(sender as Object, e as EventArgs) Handles
btnPg1.Click
pnlPg1.Visible = True
pnlPg2.Visible = False
pnlPg3.Visible = False
pnlPg4.Visible = False
pnlPg5.Visible = False
End Sub
Is there perhaps more of a dotNET approach?
TIA...
I guess I should lookup more on that CSS stuff.
You will have to change from ASP.Net Visibility to CSS visiblity:
pnlPg1.Visible = true
pnlPg1.Attributes.Add("display", "");
pnlPg2.Visible = true
pnlPg2.Attributes.Add("display", "none");
pnlPg3.Visible = true
pnlPg3.Attributes.Add("display", "none");
pnlPg4.Visible = true
pnlPg4.Attributes.Add("display", "none");
then in your HTML add
<link href="http://links.10026.com/?link=print.css" type="text/css" rel="stylesheet" media="print">
print.css:
--
#pnlPg1 { display:; }
#pnlPg2 { display:; }
#pnlPg3 { display:; }
#pnlPg4 { display:; }
#pnlPg5 { display:; }
When you change the Visible Property in .NET it doesn't ever render the
control to the browser. If you have all the Visible Properties set to true
and use the css style display attribute = "" (blank-visible) or "none"
(invisible). Then every panel is rendered to the browser and you control
the visiblity on the client side using CSS
So the page uses the default CSS from you code on the screen layout, then
when you print using the it uses the printCSS and will make all panels
visible.
Let us know if this works.
what's "normal" anyway.
While *I* wouldn't do it this way, there's nothing wrong with your
approach
For your case
Set up another command button btnPrint
Private Sub btnPrint_Click(sender as Object, e as EventArgs) Handles
btnPrint.Click
pnlPg1.Visible = True
pnlPg2.Visible = True
pnlPg3.Visible = True
pnlPg4.Visible = True
pnlPg5.Visible = True
Page.RegisterStartupScript("PrintScript", "<SCRIPT
language='javascript'>window.print(); history.back();</SCRIPT>")
End Sub
I would probably have to agree. Setting up a print page would definately be
cleaner
JavaScript to the rescue!...again
I remember using a LOT of JavaScript with ASP.Classic
That gave me something to work with.
Thanks.
Ben Dewey wrote:
> I would probably have to agree. Setting up a print page would definately
be
> cleaner

Friday, March 16, 2012

newline within a string

How can I insert a new line character (\n?) within a string in C#, so that when I display the string in some text box the string is displayed in multiple linesHi,

you can use System.Envirnment.NewLine() method to insert newline. Also if you are using Multiline textbox then I think you need to do something like this:


string AllText = TextBox1.Text.Replace(System.Envirnment.NewLine(),"<BR>");


What I am trying to do is

string strnewline;
TextBox1.text=strnewline;

Now I want to define the strnewline such that
TextBox1.text=strnewline;

displays the text in multiple lines. TextBox1 is multilined.

In short, is there any alternative to C-lang "/n " ?
check the code that I gave you it works !!!!

Newline with HTMLEncode in Div and Label

Hi

I have a table column that has multiple lines (\r\n) and html tags in it. I
want to display it in a div and label that html tags can be seen and
newlines should work.
If i use div.innerHTML newlines are lost and html tags doesn't show.
If i use div.innerHTML with replace(Environment.NewLine,"<br>") breaks works
but html tags doesn't show.
If i use div.innerText again newlines and html tags are lost.

What can i do?

ThanksVersus,
The bottom line is that "\r\n" means nothing in HTML - you have to change it
to "<br/>" -- which means you need to pre-process your string with
..Replace("\r\n", "<br/>");

-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"versus" wrote:

Quote:

Originally Posted by

Hi
>
I have a table column that has multiple lines (\r\n) and html tags in it. I
want to display it in a div and label that html tags can be seen and
newlines should work.
If i use div.innerHTML newlines are lost and html tags doesn't show.
If i use div.innerHTML with replace(Environment.NewLine,"<br>") breaks works
but html tags doesn't show.
If i use div.innerText again newlines and html tags are lost.
>
What can i do?
>
Thanks
>
>
>


Thanks for answering. Replace(Environment.NewLine,"<br>") already works for
that problem. But i cannot see html tags as regular text. I want them to be
displayed not parsed with htmlparser.

Let me explain again. I have an sql db table with columns that has both
environment.newline(\r\n) and html tags. I want newlines to break lines and
html tags to be displayed at the same time.

"Peter Bromberg [C# MVP]" <pbromberg@.yahoo.yohohhoandabottleofrum.comwrote
in message news:4CA1F3DF-BB2B-479B-8025-69154C4984C5@.microsoft.com...

Quote:

Originally Posted by

Versus,
The bottom line is that "\r\n" means nothing in HTML - you have to change
it
to "<br/>" -- which means you need to pre-process your string with
.Replace("\r\n", "<br/>");
>
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
>
>
>
"versus" wrote:
>

Quote:

Originally Posted by

>Hi
>>
>I have a table column that has multiple lines (\r\n) and html tags in it.
>I
>want to display it in a div and label that html tags can be seen and
>newlines should work.
>If i use div.innerHTML newlines are lost and html tags doesn't show.
>If i use div.innerHTML with replace(Environment.NewLine,"<br>") breaks
>works
>but html tags doesn't show.
>If i use div.innerText again newlines and html tags are lost.
>>
>What can i do?
>>
>Thanks
>>
>>
>>


"versus" <tencere@.dibin.karawrote in message
news:ee99xTJGIHA.4808@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

Thanks for answering. Replace(Environment.NewLine,"<br>") already works
for that problem. But i cannot see html tags as regular text. I want them
to be displayed not parsed with htmlparser.
>
Let me explain again. I have an sql db table with columns that has both
environment.newline(\r\n) and html tags. I want newlines to break lines
and html tags to be displayed at the same time.
>
"Peter Bromberg [C# MVP]" <pbromberg@.yahoo.yohohhoandabottleofrum.com>
wrote in message
news:4CA1F3DF-BB2B-479B-8025-69154C4984C5@.microsoft.com...

Quote:

Originally Posted by

>Versus,
>The bottom line is that "\r\n" means nothing in HTML - you have to change
>it
>to "<br/>" -- which means you need to pre-process your string with
>.Replace("\r\n", "<br/>");
>>
>-- Peter
>Recursion: see Recursion
>site: http://www.eggheadcafe.com
>unBlog: http://petesbloggerama.blogspot.com
>BlogMetaFinder: http://www.blogmetafinder.com
>>
>>
>>
>"versus" wrote:
>>

Quote:

Originally Posted by

>>Hi
>>>
>>I have a table column that has multiple lines (\r\n) and html tags in
>>it. I
>>want to display it in a div and label that html tags can be seen and
>>newlines should work.
>>If i use div.innerHTML newlines are lost and html tags doesn't show.
>>If i use div.innerHTML with replace(Environment.NewLine,"<br>") breaks
>>works
>>but html tags doesn't show.
>>If i use div.innerText again newlines and html tags are lost.
>>>
>>What can i do?
>>>
>>Thanks
>>>
>>>
>>>


>
>


I think if you use the <pretag to wrap your code it will honor the CRLF
and show the tags as if they are text within the <pre></pretags.

Hope this helps
LS
I think if you use the <pretag to wrap your code it will honor the CRLF

Quote:

Originally Posted by

and show the tags as if they are text within the <pre></pretags.
>
Hope this helps
LS


Thanks but his solution removes css classes and when i use checkbox with
label, label click doesn't work.
On Sat, 27 Oct 2007 04:55:00 -0700, Peter Bromberg [C# MVP]
<pbromberg@.yahoo.yohohhoandabottleofrum.comwrote:

Quote:

Originally Posted by

>Versus,
>The bottom line is that "\r\n" means nothing in HTML - you have to change it
>to "<br/>" -- which means you need to pre-process your string with
>.Replace("\r\n", "<br/>");
>
>-- Peter
>Recursion: see Recursion
>site: http://www.eggheadcafe.com
>unBlog: http://petesbloggerama.blogspot.com
>BlogMetaFinder: http://www.blogmetafinder.com


Actually, newlines may make a lot of sense when you want your HTML to
be easily understood if you do a view source on the html page ...

--
http://bytes.thinkersroom.com
On 27 okt, 14:54, "Lloyd Sheen" <a...@.b.cwrote:

Quote:

Originally Posted by

"versus" <tenc...@.dibin.karawrote in message
>
news:ee99xTJGIHA.4808@.TK2MSFTNGP05.phx.gbl...
>

Quote:

Originally Posted by

Thanks for answering. Replace(Environment.NewLine,"<br>") already works
for that problem. But i cannot see html tags as regular text. I want them
to be displayed not parsed with htmlparser.


>

Quote:

Originally Posted by

Let me explain again. I have an sql db table with columns that has both
environment.newline(\r\n) and html tags. I want newlines to break lines
and html tags to be displayed at the same time.


>

Quote:

Originally Posted by

"Peter Bromberg [C# MVP]" <pbromb...@.yahoo.yohohhoandabottleofrum.com>
wrote in message
news:4CA1F3DF-BB2B-479B-8025-69154C4984C5@.microsoft.com...

Quote:

Originally Posted by

Versus,
The bottom line is that "\r\n" means nothing in HTML - you have to change
it
to "<br/>" -- which means you need to pre-process your string with
.Replace("\r\n", "<br/>");


>

Quote:

Originally Posted by

Quote:

Originally Posted by

-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com


>

Quote:

Originally Posted by

Quote:

Originally Posted by

"versus" wrote:


>

Quote:

Originally Posted by

Quote:

Originally Posted by

>Hi


>

Quote:

Originally Posted by

Quote:

Originally Posted by

>I have a table column that has multiple lines (\r\n) and html tags in
>it. I
>want to display it in a div and label that html tags can be seen and
>newlines should work.
>If i use div.innerHTML newlines are lost and html tags doesn't show.
>If i use div.innerHTML with replace(Environment.NewLine,"<br>") breaks
>works
>but html tags doesn't show.
>If i use div.innerText again newlines and html tags are lost.


>

Quote:

Originally Posted by

Quote:

Originally Posted by

>What can i do?


>

Quote:

Originally Posted by

Quote:

Originally Posted by

>Thanks


>
I think if you use the <pretag to wrap your code it will honor the CRLF
and show the tags as if they are text within the <pre></pretags.
>
Hope this helps
LS


That's correct but the problem lies elsewhere.
If you update a <pretag with innerHTML, Internet Explorer will
remove the \n's before it's in the <pretag.

News Group Display

Is there any way to download the contents of a news group such that it can
be displayed via a web page.

TIA

Derek

--
_______________________________________________

www.windowsmce.com - Windows Media Center Edition UKHi Derek:

You'll want to search for an NNTP component you can use from .NET. I'm
sure there are free ones available but I do not have any to recommend.

--
Scott
http://www.OdeToCode.com/

On Tue, 05 Oct 2004 15:36:07 GMT, "DJY\(www.windowsmce.com\)"
<djy2000@.ntlworld.com> wrote:

>Is there any way to download the contents of a news group such that it can
>be displayed via a web page.
>TIA
>Derek
Cheers

D

"Scott Allen" <bitmask@.[nospam].fred.net> wrote in message
news:l5h5m0h4dna887g8n6g2g3n5pn5ar8kjrt@.4ax.com...
> Hi Derek:
> You'll want to search for an NNTP component you can use from .NET. I'm
> sure there are free ones available but I do not have any to recommend.
> --
> Scott
> http://www.OdeToCode.com/
> On Tue, 05 Oct 2004 15:36:07 GMT, "DJY\(www.windowsmce.com\)"
> <djy2000@.ntlworld.com> wrote:
>>Is there any way to download the contents of a news group such that it can
>>be displayed via a web page.
>>
>>TIA
>>
>>Derek

News Group Display

Is there any way to download the contents of a news group such that it can
be displayed via a web page.
TIA
Derek
________________________________________
_______
www.windowsmce.com - Windows Media Center Edition UKHi Derek:
You'll want to search for an NNTP component you can use from .NET. I'm
sure there are free ones available but I do not have any to recommend.
Scott
http://www.OdeToCode.com/
On Tue, 05 Oct 2004 15:36:07 GMT, "DJY\(www.windowsmce.com\)"
<djy2000@.ntlworld.com> wrote:

>Is there any way to download the contents of a news group such that it can
>be displayed via a web page.
>TIA
>Derek
Cheers
D
"Scott Allen" <bitmask@.[nospam].fred.net> wrote in message
news:l5h5m0h4dna887g8n6g2g3n5pn5ar8kjrt@.
4ax.com...
> Hi Derek:
> You'll want to search for an NNTP component you can use from .NET. I'm
> sure there are free ones available but I do not have any to recommend.
> --
> Scott
> http://www.OdeToCode.com/
> On Tue, 05 Oct 2004 15:36:07 GMT, "DJY\(www.windowsmce.com\)"
> <djy2000@.ntlworld.com> wrote:
>
>

News Ticker

Hi,
I am currently working on a site and i need to implement a News Ticker into the Main Page i have and be display general information to users.
So i am looking for some examples in .Net everthing i have seen is done in Applets.
Could someone please point me in the right direction.

Thanks, RonMaybe you should take a look at htis product:

http://www.richcontentrotator.com/home.aspx
Hi freind,

I am facing the same problem you used to have. I tried to view the website that was sent to you but didn't find any help could you please advice me if you can.

Thanks :)