|
|
Hello,
I am using a panel control on page.
I want a html of the pannel control in codebehind.
Thanks in Advance
Regards,
Milind
|
|
|
|
|
Hi,
what are you trying to achieve? please clarify
himanshu
|
|
|
|
|
I am trying to get HTML containing in the Panel object (the panel is contaning tables and gridview)
|
|
|
|
|
milindchavan12 wrote: I want a html of the pannel control in codebehind.
You want the rendered HTML output of the panel, right? Try something like
public string GetControlRenderedOutput(Control control)
{
StringBuilder builder = new StringBuilder();
StringWriter writer = new StringWriter(builder);
HtmlTextWriter htmlWriter = new HtmlTextWriter(writer);
control.RenderControl(htmlWriter);
return builder.ToString();
} Try passing your panel's object to this method.
modified on Monday, June 15, 2009 8:42 AM
|
|
|
|
|
|
Ohh Problem ....
It is giving me error on control.RenderControl(htmlWriter) line.
public string GetControlRenderedOutput(Control control)
{
StringBuilder builder = new StringBuilder();
StringWriter writer = new StringWriter(builder);
HtmlTextWriter htmlWriter = new HtmlTextWriter(writer);
control.RenderControl(htmlWriter); return builder.ToString();
}
Error :
RegisterForEventValidation can only be called during Render();
|
|
|
|
|
Read this [^]
You are best person who knows about your problem.
-------------------------------------------------
More pain more gain
|
|
|
|
|
In my application i want to add some text and an image dynamically in a text area like we are doing in e-mail.How can it be possible.
Thanx in advance.
|
|
|
|
|
gogal1983 wrote: How can it be possible.
Its not possible in text area.
You can instead use some other element do this. for eg, a table, div etc
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Email text editors are using iFrame not text area. Look at open-source implementation like tinymce[^].
|
|
|
|
|
It is not possible in a text area. You have to look for some other options where html elements can be embedded.
There is no foolish question, there is no final answer...
|
|
|
|
|
how to inherit a class file in our aspx page
to acess the functionality
|
|
|
|
|
Please read the Asp.net basics
himanshu
|
|
|
|
|
Which functionality ? TO inherit page class, use like this YourClass:Page. Do you need to add more class to be inherited. It is not possible in c#. use interface for that.
You are best person who knows about your problem.
-------------------------------------------------
More pain more gain
|
|
|
|
|
.Net does not allow multiple inheritance. As all the web forms are already inherited from a Page class, it cannot be directly done.
Another suggestion could be to create a Class(lets say BasePageClass) and inherit it from Page. Put the functionality which you currently have in your class in the BasePageClass.
Now in your aspx page, use the BasePageClass to inherit instead of Page.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
anbusenthil wrote: how to inherit a class file in our aspx page
to acess the functionality
All the question that you have asked in this forums are very basic. And it seems you don't have any idea that what you are doing. So, My suggestion to you to that please Buy some Good beginner's Book and start reading. After doing the basic from books read some article from net. Then try to do your work. It will help you in Long Run.
|
|
|
|
|
Private Sub LoadStrings(ByVal ci As CultureInfo)
Dim HylEdit As HyperLink
Dim BtnClear As Button
Dim BtnSave As Button
Dim HylView As HyperLink
Dim TDAwd As HtmlContainerControl
Dim TDAwdDes As HtmlContainerControl
Dim TDAwdpic As HtmlContainerControl
Dim TDFreq As HtmlContainerControl
Dim TDAwdcri As HtmlContainerControl
Dim TDAwdSt As HtmlContainerControl
Dim TDAwdk As HtmlContainerControl
errror here variable'HylEdit' is used before its assigned a value( its an class file inside the app_code) <--- HylEdit.Text = rm.GetString("Add", ci)
BtnClear.Text = rm.GetString("Clear", ci)
BtnSave.Text = rm.GetString("Save", ci)
HylView.Text = rm.GetString("View", ci)
TDAwd.InnerText = rm.GetString("Awd", ci)
TDAwdDes.InnerText = rm.GetString("Awddes", ci)
TDAwdpic.InnerText = rm.GetString("Awdpi", ci)
TDFreq.InnerText = rm.GetString("Freq", ci)
TDAwdcri.InnerText = rm.GetString("Awdcri", ci)
TDAwdSt.InnerText = rm.GetString("AwdSt", ci)
TDAwdk.InnerText = rm.GetString("Awdk", ci)
End Sub
|
|
|
|
|
you have not assigned the variable.It has to be instantiated before using it.
Dim HylEdit As New HyperLink
himanshu
|
|
|
|
|
Dim TDAwdDes As HtmlContainerControl---> these r html contrtols which is showing an error new cannot be used in class tat is declared must inherit
Dim TDAwdpic As HtmlContainerControl
TDAwd.InnerText = rm.GetString("Awd", ci)
TDAwdDes.InnerText = rm.GetString("Awddes", ci)
|
|
|
|
|
Hi to all,
My project has reading mails from mail server.
the mail server is not in OUTLOOK. Its like a Exchange server like gmail,yahoo & organisation server
so on...I am reading all the mails & save the attachments.
I am Using the sample Application is.,
http://www.codeproject.com/KB/IP/Pop3MimeClient.aspx
But I can't read UNREAD mails.there is no flag in that application.
So How to read UNREAD mails from mail server???
Thanks,
nkmKrishna.
|
|
|
|
|
Why are you posting same question multiple times. You have just posted the question just few hours back. Have a look
|
|
|
|
|
Hi,
I need to import data from a CSV file to an SQL table i have used tohe following in the past to import an excel file but wondered if/how i can adapt it to import from a CSV.
Also, it would be a great help if you could show me how to convert it to use column mapping.
string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\qs_upload.xls;Extended Properties=""Excel 8.0;HDR=YES;""";
using (OleDbConnection connection = new OleDbConnection(excelConnectionString))
{
OleDbCommand command = new OleDbCommand("Select * FROM [quality_standard$]", connection);
connection.Open();
using (OleDbDataReader dr = command.ExecuteReader())
{
string sqlConnectionString = "Data Source=wibblewobble.com;Initial Catalog=comfound;Persist Security Info=True;User ID=##########;Password=##########";
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlConnectionString))
{
bulkCopy.DestinationTableName = "tbl_QualityStandard";
bulkCopy.WriteToServer(dr);
}
}
}
Thanks.
|
|
|
|
|
Your question is not properly visible.please post it properly.
himanshu
|
|
|
|
|
I have to run an EXE in remote machine, exe will be present in same remote machine just i have to initiate that EXE through my code.
I am using ASp.Net with C#
Can you help me to solve this problem by providing steps/code for this need...
|
|
|
|