Showing posts with label datagrid. Show all posts
Showing posts with label datagrid. Show all posts

Thursday, March 22, 2012

taking a table out of a page and emailing it

Is there a way to read the current Asp.net page where I may have built some
statistics and displayed it on the screen in a Datagrid, and take the table
(datagrid) and put it into an email and send it from that page?
I would also like to read part of a page and print it directly to the
printer.
Thanks,
TomIf you move the logic to a user control, it's a pretty simple thing to do:
http://openmymind.net/FAQ.aspx?documentId=45
Karl
http://www.openmymind.net/
"tshad" <tfs@.dslextreme.com> wrote in message
news:eF2IqikeGHA.1320@.TK2MSFTNGP04.phx.gbl...
> Is there a way to read the current Asp.net page where I may have built
> some
> statistics and displayed it on the screen in a Datagrid, and take the
> table
> (datagrid) and put it into an email and send it from that page?
> I would also like to read part of a page and print it directly to the
> printer.
> Thanks,
> Tom
>
"Karl Seguin [MVP]" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:e3U%23HTneGHA.2172@.TK2MSFTNGP04.phx.gbl...
> If you move the logic to a user control, it's a pretty simple thing to do:
> http://openmymind.net/FAQ.aspx?documentId=45
Not quite sure if that would do what I am trying to do or not.
There was a way to do this I found a long time ago that allowed me to grab
part of my page and put it into my email to send out, but I can't seem to
find that anymore.
Thanks,
Tom
> Karl
> --
> http://www.openmymind.net/
>
> "tshad" <tfs@.dslextreme.com> wrote in message
> news:eF2IqikeGHA.1320@.TK2MSFTNGP04.phx.gbl...
>

taking a table out of a page and emailing it

Is there a way to read the current Asp.net page where I may have built some
statistics and displayed it on the screen in a Datagrid, and take the table
(datagrid) and put it into an email and send it from that page?

I would also like to read part of a page and print it directly to the
printer.

Thanks,

TomIf you move the logic to a user control, it's a pretty simple thing to do:
http://openmymind.net/FAQ.aspx?documentId=45

Karl

--
http://www.openmymind.net/

"tshad" <tfs@.dslextreme.com> wrote in message
news:eF2IqikeGHA.1320@.TK2MSFTNGP04.phx.gbl...
> Is there a way to read the current Asp.net page where I may have built
> some
> statistics and displayed it on the screen in a Datagrid, and take the
> table
> (datagrid) and put it into an email and send it from that page?
> I would also like to read part of a page and print it directly to the
> printer.
> Thanks,
> Tom
"Karl Seguin [MVP]" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:e3U%23HTneGHA.2172@.TK2MSFTNGP04.phx.gbl...
> If you move the logic to a user control, it's a pretty simple thing to do:
> http://openmymind.net/FAQ.aspx?documentId=45

Not quite sure if that would do what I am trying to do or not.

There was a way to do this I found a long time ago that allowed me to grab
part of my page and put it into my email to send out, but I can't seem to
find that anymore.

Thanks,

Tom
> Karl
> --
> http://www.openmymind.net/
>
> "tshad" <tfs@.dslextreme.com> wrote in message
> news:eF2IqikeGHA.1320@.TK2MSFTNGP04.phx.gbl...
>> Is there a way to read the current Asp.net page where I may have built
>> some
>> statistics and displayed it on the screen in a Datagrid, and take the
>> table
>> (datagrid) and put it into an email and send it from that page?
>>
>> I would also like to read part of a page and print it directly to the
>> printer.
>>
>> Thanks,
>>
>> Tom
>>
>>

Tuesday, March 13, 2012

Tb.text = string What Won't transfer?

In the ItemDataBound event of a datagrid, I am moving data from a varchar
cell into a textbox in a template cell as follows...
mytb.text = e.item.cells(i).text
my problem/question is that this move does not move all characters. For
instance carriage returns and line feeds don't get moved, and some other non
printable characters don't get moved.
Is there any documentation or rule as to what gets moved and what gets
ingored?
Thanks,
TOf course they don't. ASP:TextBox corresponds to <input type=text>.
That's a single line input, so naturally it only takes the first line
that you stick into it.
Try HtmlTextArea (<textarea runat=server> ) if you want multiline
input.
Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
Get your own Travel Blog, with itinerary maps and photos!
http://www.blogabond.com/
no, it just eliminates the characters and picks back up with following
characters. Effectively it "strips" them
T
"Jason Kester" <jasonkester@.gmail.com> wrote in message
news:1130019965.292118.103810@.g44g2000cwa.googlegroups.com...
> Of course they don't. ASP:TextBox corresponds to <input type=text>.
> That's a single line input, so naturally it only takes the first line
> that you stick into it.
> Try HtmlTextArea (<textarea runat=server> ) if you want multiline
> input.
> Jason Kester
> Expat Software Consulting Services
> http://www.expatsoftware.com/
> --
> Get your own Travel Blog, with itinerary maps and photos!
> http://www.blogabond.com/
>
Same effect as far as you're concerned. Be careful of the ASP:Whatever
tags that have a .Text property. They will invariably reformat your
strings to ensure that it gets HtmlEntityEncoded, and often lead to
wacky behavior like you're seeing.
Did switching to Textareas help?
Jason
well, back to my original question...
Is there any documentation or rule as to what gets moved and what gets
ingored?
T
"Jason Kester" <jasonkester@.gmail.com> wrote in message
news:1130022048.185101.202910@.g49g2000cwa.googlegroups.com...
> Same effect as far as you're concerned. Be careful of the ASP:Whatever
> tags that have a .Text property. They will invariably reformat your
> strings to ensure that it gets HtmlEntityEncoded, and often lead to
> wacky behavior like you're seeing.
> Did switching to Textareas help?
> Jason
>
It's not that something will be ignored. Incase, have some "<" / ">",
you'll get a "Potentially dangerous..." exception.
To avoid this, set the property "ValidateRequest = false" in @.Page
directive.
See documentation of "@.Page directive" for more details.
Cheers,
Gaurav Vaish
http://mastergaurav.org
--