|
Hello,
I'm busy with an rich text editor inside a web page.
But when I try to render the HTML (to set it as a preview in a new textbox) it gives an error:
Control 'TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server.
You will probably say something like: place the textbox in a form with runat=server.
Well, I did that. This is my code:
<body>
<form id="form1" runat="server">
<div class="somecss">
<mnt:RichTextEditor Editor="SimpleEditor" Script="First" runat="server" ID="RTE" Rows="20" Columns="75" TextMode="MultiLine" />
</div>
<asp:button ID="Button1" runat="server" text="To Preview" OnClick="Click" OnClientClick="myEditor.saveHTML();" />
<br /><br />
<asp:TextBox ID="TextBox1" runat="server" Rows="20" Columns="75" TextMode="MultiLine" />
</form>
</body>
protected void Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder(RTE.Text);
StringWriter tw = new StringWriter(sb);
HtmlTextWriter hw = new HtmlTextWriter(tw);
TextBox1.RenderControl(hw);
}
|
|
|
|
|
can any body tell me how can i use .vb file in c# project
when i add .vb file it does not allow me while compile time.
or i have code of a recursive function of vb and i want to use it in
C#
when i convert it using conversion software it also gives me syntax error
please give easiest way..
umerumerumer
|
|
|
|
|
you have to make a dll of your VB code.
that's the only way. you can't add your vb code file in your c# file.
|
|
|
|
|
Create a Class Library(.dll) in VB.
Add it as a Reference in your C# Application.
|
|
|
|
|
how to create class library(.dll) in vb???? can you give me procedure?
umerumerumer
|
|
|
|
|
mr_muskurahat wrote: how to create class library(.dll) in vb????
Start New Project -> New -> Select Control Library Template -> Change Langauge to VB
Then Create Your Class and Build The Application , Check Your Dll Will be create on bin Directory.
Now open a new project and Add Reference that Dll and you can use methods and procedure of that dll.
cheers,
Abhijit
|
|
|
|
|
If this is code you got off t'internet, it's really not that hard to translate from VB.net to C#... Easier than creating a new project just to host this function.
|
|
|
|
|
1. You can make a dll by creating a new windows library type project.
2. Instead of creating a dll and adding its reference it is better that you use the online translator to convert vb file to c#. You can use this http://www.developerfusion.com/tools/convert/vb-to-csharp/[^]
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
XML Parsing Error: not well-formed
Location: file:///C:/Inetpub/wwwroot/RSys/Thankyou.aspx
Line Number 1, Column 2:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Thankyou.aspx.cs" Inherits="Thankyou" %>
-^
Impact Pro
|
|
|
|
|
hi every one..
plz any one can help me..
i got this error...
Parser Error Message: Unrecognized attribute 'xmlns'.
When I run the webpage from the server it works without a problem. But if I try running the webpage from a remote box the first screen works, but clicking a hyperlink on the first page shows this error:
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'xmlns'.
Source Error:
Line 1:
Line 2: <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
Line 3: <appsettings>
Source File: c:\inetpub\wwwroot\TESTPORTAL05\web.config Line: 2
thnaks
Impact Pro
|
|
|
|
|
Have you put a namespace in your web.config file?
|
|
|
|
|
Hi all
I wamt to use a DropDownList with ASP.NET.My code like this:
in Page_Load event:
ddlAdminicle.DataTextField = "Adminicle";
ddlAdminicle.DataValueField = "CodeAdminicle";
ddlAdminicle.DataBind();
and in accept event:
row = Convert.ToInt16(ddlAdminicle.SelectedItem.Value);
but items didn't selected
what should i do?
|
|
|
|
|
Just put Convert.ToInt32(ddlAdminicle.SelectedValue)
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
set autopostback is true for ddlAdminicle
|
|
|
|
|
Hi ,
I just want a piece of code for appending a single column data base values of a table in a single string seperating by "," or "|".
|
|
|
|
|
Could you explain a little bit more what exactly you want to do? Giving an example will be better
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
fetch your code in datareader from the table
than loop throw the datareader and add the values in the string.
steps to do that
SqlConnection con = new SqlConnection("YOur connection string");
SqlCommand cmd = new SqlCommand(con,"Your query here");
con.Open();
DataReader dr = cmd.ExecuteNonQuery(); //confirm if this is the write function to call
string strValues = string.Empty;
while(dr.Read())
{
strValues += dr[0].ToString();
}
Note: There may be a bit of problem in this code.. i hope u can fix that.
|
|
|
|
|
Ask SQL question on SQl forum
Declare @result varchar(8000)
select @result = Coalesce (@results + ',', '') + columnName
from tableName
where condition
Alexei Rodriguez
|
|
|
|
|
Hey guys
Right now i am have this issue . Two person are updating a same record.
Is there a way to lock the record from being process? Right now i am using the method that once the record is loaded, it update the database record status field Lock to Y. The next person that load will check with database whether the Lock is N if is Y it cannot update. however if the user never update the record lock status Back to N once finish , this record cannot process by anyone else or view...
Any better solutions or idea?
Thanks bro
KaKaShi HaTaKe
|
|
|
|
|
|
we are setting few cookies in web application.when we try to access application using safari browser on Mac operating system,one of the cookies is not set. when we tried with another machine(Mac) safari browser, we are able to see cookie being created but it is not expiring as we set in code.we are not sure why this is happening with that particular cookie only. but other cookies are working as expected.we didn't get any issues with other browsers(IE and Firefox in windows)
Thank you in advance
|
|
|
|
|
i have attached exe file on asp.net page it was running well but when it was host to webserver it was creating problem.code given below:
System.Diagnostics.Process process1 = new System.Diagnostics.Process();
// Set the directory where the file resides
process1.StartInfo.WorkingDirectory = Request.MapPath("~/");
// Set the filename name of the file you want to open
process1.StartInfo.FileName = Request.MapPath("hard_disk_serialNo.exe");
// Start the process
process1.Start();
Thanks in Advance
|
|
|
|
|
You are doing this thing in asp.net. And page is rendered on user machine. So the path you are giving should be present on user machine. Then perhaps you can make it run. By using the above process you can run any exe resident on the server. But exe will not be visible to the user.
I wonder what you want to do.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
Now that's just not true - asp.net runs the code on the server side, so this will always run this code on the server.
|
|
|
|
|
AhsanS wrote: So the path you are giving should be present on user machine. Then perhaps you can make it run
Wrong, as in very.
AhsanS wrote: Senior Software Engineer
|
|
|
|