|
The table will render properly if you send the mail as HTML. Not all clients support HTML though.
I are troll
|
|
|
|
|
I have already tried using
Table2.InnerHtml but i get not supported exception. now my only question is
also I have tried using below
Dim SB As New StringBuilder()
Dim SW As New StringWriter(SB)
Dim htmlTW As New HtmlTextWriter(SW)
Table2.RenderControl(htmlTW)
Dim tbl As String = SB.ToString()
MailMsg.Body += tbl
but this doesnt gives me the dynamically generated records.
how do i get currently rendered html content via aspx page(please note contents of Table2 is generated dynamically) and how do i use regex to only copy Table2's content.
please help
modified on Wednesday, January 7, 2009 11:13 AM
|
|
|
|
|
The examples below might help you;
http://dotnettricks.com/blogs/craigbowesblog/archive/2006/09/09/105.aspx
http://blogs.x2line.com/al/articles/859.aspx
--
What does it give you then? If the code runs correct, you should get the HTML as generated by "Table2". Does it?
I are troll
|
|
|
|
|
I have already tried what is mentioned in the article.
This only gives what is already in TAble2 before rendering Table2 programatically. here is what TAble2 has before its rendered programatically
<TABLE id="Table2" cellSpacing="0" cellPadding="4" runat="server">
<TR >
<TD width="30%">Product Name:</TD>
<TD width="30%">Quantity:</TD>
<TD width="10%">UnitPrice:</TD>
<TD width="10%">Amount:</TD>
</TR>
</TABLE>
the scripts mentioned in the article only gives me above but not the end result. i.e additional rows that are created programatically.
could someone please help?
|
|
|
|
|
sorry this works fine. I think the postback was causing the programatically created data not being loaded
I did this before I do postback
cache("data") = RenderControls(Table2) --> this comes from one of the links you provided me.
and it Mailmsg.body +=cache("data")
Thanks very much
|
|
|
|
|
Here is another idea. If your HTML is actually XHTML (basically HTML that complies with the stricter rules governing XML) then you could load it into an XDocument (if you have .NET 3.5) or XmlDocument (for any version of .NET) and extract it using XPath, or navigating to the appropriate node and performing InnerXml (or OuterXml ).
|
|
|
|
|
|
HI!
How kan I List the ”user logon (pre windows....)” on aspx-page?
I have win 2003 server and VS2005.
Thanks
HD
|
|
|
|
|
|
I guess that's "before" the user logs in to Windows?
Doesn't make sense either way
I are troll
|
|
|
|
|
Awesome sig.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Thanks to the reply!
But I meen How to extract Active Directories Properties.
Some of them are in form of collections (name:value).
And others are in Com objects, this is the problem. Here an axampel.
nSNCreated:System._ComObject
nSNChanged:System._ComObject
How can I get the value for those Properties?
Thanks
HD
|
|
|
|
|
The System.DirectoryServices namespace built into the .NET Framework is designed to provide programming access to LDAP directories (Active Directory).
I'd recommend this article
I are troll
|
|
|
|
|
Thanks to u, I will read it.
I hops that it will helps
|
|
|
|
|
Hello All,
Happy New Year.
I am developing an application in vb.net 3.5
I have a MDI form and Several Child Form. In my MDI form I put some Button Like Save,Exit ...
In these button Click Event I called the Save function or exit function of the Child Forms.
Suppose I have Two Child Form "Form1" and "Form2"
In the MDI Save Button Click I call the different events different "Form1.Save" or "Form2.Save".
But There is a Focus problem In my Child forms. If I am go for "Form1.Save" its working, but after save the focus will be return back to the "Form1", Then If I doing any activity in my "Child1" it throws an error message "Object reference not set to an instance of the object..."
and also a strange problem occures in my form after these any event will be called twice.
So, What is the Solution of this problem.
Please Help me.
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
pdnet wrote: If I am go for "Form1.Save" its working, but after save the focus will be return back to the "Form1",
So the focus is staying in the form that was active? Or do you mean that if you're on form2 and you press save for form1 the focus goes to form1. If that's the case, you most likely set the focus during the save.
pdnet wrote: hen If I doing any activity in my "Child1" it throws an error message "Object reference not set to an instance of the object..."
Didn't quite get what was child1 but I'd guess you store a reference to your form somewhere which is at call time nonexistent.
pdnet wrote: also a strange problem occures in my form after these any event will be called twice
Most likely you have duplicate handlers for those events.
|
|
|
|
|
Hi All,
I have doubt about datagridviewcell. i have created textboxcolumn in datagridview. when ever i click the particular cell that time the cell can change datagridviewcomboboxcell and also i need to add the item in combobox collection and when i go to another cell that time new cell get datagridviewcombobox cell and existing cell can change datagridviewtextbox cell kindly any one help me to do this. advance thanks for your help.
i am a fresher in software development i have so many doubts in .net so i need to ca
|
|
|
|
|
i think you want to select one value from multiple item and fill this item in selected cell. If yes, then create separate ComboBox which visiblity is false and fill this ComboBox with item. Now when datagridvew's cell got focus then place the ComboBox on selected cell location and set it visiblity to True. Now on lost focus event of ComboBox, place ComboBox text to cell and hide the ComboBox
|
|
|
|
|
can you provide the code
i am a fresher in software development i have so many doubts in .net so i need to ca
|
|
|
|
|
Suppose you want to fill the value in column 2 then use CellEnter event of datagridview as follows.
Private Sub dgv1_CellEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgv1.CellEnter<br />
<br />
If e.ColumnIndex = 1 Then<br />
ComboBox1.Visible = True 'comboBox1 is combo box which contains multiple item<br />
ComboBox1.Left = dgv1.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, False).Left + dgv1.Left<br />
ComboBox1.Top = dgv1.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, False).Top + dgv1.Top<br />
ComboBox1.BringToFront()<br />
<br />
RowIndexForComboHandling = e.RowIndex<br />
ComboBox1.Text = dgv1.Rows(e.RowIndex).Cells(e.ColumnIndex).Value<br />
ComboBox1.Width = dgv1.Columns(1).Width<br />
Else<br />
ComboBox1.Visible = False<br />
End If<br />
<br />
End Sub<br />
and this is the lost focus event of combobox1
Private Sub ComboBox1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.LostFocus<br />
If ComboBox1.Text.Trim <> "" Then<br />
dgv1.CurrentCell.Value = ComboBox1.Text<br />
End If<br />
dgv1.Focus()<br />
dgv1.CurrentCell = dgv1.Rows(dgv1.CurrentCell.RowIndex).Cells(dgv1.CurrentCell.ColumnIndex + 1)<br />
comboBox1.visible=false End Sub
hope this helps
|
|
|
|
|
Hi All,
I got a requirement, "To retrieve the list of machine names in which a particular user is logged on to,in an Active Directory."
Any suggestions please ..
Thanks & Regards,
Chaitanya.
|
|
|
|
|
You can't find out. AD doesn't track that information.
|
|
|
|
|
Man, would be sweet if it did though
|
|
|
|
|
I have an application which allows the user to select multiple combo boxes and then display data in a datagrid view depending on what is selected in the combo boxes.
However, one of my fields is called 'Fee'. Obviously, this is a decimal value, I am trying to use a combo box to select a range of fees (0 - 150, 151 - 200 etc).
For the other 3 combo boxes on the form, the values are coming from a stored procedure, however, i cannot do this for the 'fee' field because i receive errors when it tries to convert to decimal.
The text in my combo box will be like the example above (0 - 150) but the values in the database are formatted differently (150.00, 170.20).
My question is, how would i be able to filter out results in my datagrid view by using a range on the 'fee' field, i thought about a case statement but at the moment it just brings back a datagrid with 'rowerrors' as a column title.
|
|
|
|
|
You asked this question 2 days ago - did you try what was listed?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|