|
|
Hey guys need ur help again
I am doing a search function that can use chinese character to search. However the database store those chinese character is in Unicode Number. Now i am finding a way to convert my chinese character to unicode so i could search in the database
Any ideas on how to convert the chinese character back Unicode?
I am using C# in ASP.net 2.0
Thanks a million
KaKaShi HaTaKe
|
|
|
|
|
So are you using ASCII Chinese fonts to input the text? See[^] the character chart for Chinese. And do the conversion according to that.
|
|
|
|
|
Hi,
I m creating a treeview dynamically and saving the nodevalues as xmlfile ,now i want to save the whole xmlfile in a listbox instead of saving it in a .xml file.Can anyone help me for doing this??
|
|
|
|
|
|
I want to save Xml file inside a listbox or a textbox control...
|
|
|
|
|
why dont you try from javascript :
textfield.value
Listbox is not a good option for xml files.
Abhishek Sur
|
|
|
|
|
Hi
I have the Following code which opens a pdf that is stored in a sql database.
How do i attach the pdf to an email, or save the pdf to a temp folder, without openig the file.
void openPDF()
{
string sqlText = "SELECT PDF FROM tbObject WHERE ID = @ObjectID ";
SqlConnection connection = new SqlConnection(ConfigurationSettings.AppSettings["DbConnection"].ToString());
SqlCommand command = new SqlCommand(sqlText, connection);
command.Parameters.AddWithValue("@ObjectID ", Convert.ToInt32(Request["id"].ToString()));
connection.Open();
byte[] pdfData = (byte[])command.ExecuteScalar();
if (pdfData != null)
{
Response.ContentType = "application/pdf"; Response.AddHeader("content-length", pdfData.Length.ToString()); Response.AddHeader("content-disposition", "inline; filename=MyPDF.PDF");
Response.BinaryWrite(pdfData);
}
else
{
}
connection.Close();
}
Thanx Guyz
|
|
|
|
|
why dont you use:
FileStream ff = new FileStream("MyPDF.PDF", FileMode.Create);
ff.Write(pdfData, 0, pdfData.Length);
ff.close();
Abhishek Sur
|
|
|
|
|
Hi,
I have to take backup of the mysql database from the server to local machine database using asp.net 2.0. I have established the connection to the server database using the server name,username,password. Now i need to connect the local machine database. I have used the server name as 'localhost',username'root',pwd 'root'
But its not establishing the connection to the local machine when i upload the code in the server.
Can Anyone give me an idea how to connect to the local machine.
Thanks
|
|
|
|
|
sbua wrote: But its not establishing the connection to the local machine when i upload the code in the server.
um...
You're using localhost, because your DB is local to you, but you're running the code on the server ? Have I got it wrong, or is this a joke ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
I tried to take the backup of mysql server database to my local database. I dont know how to do this.
Could you please give me an idea to implement this.
Thanks
|
|
|
|
|
Where is this ASP.NET application running? Server or your local machine? If it is on server, you are out of luck.
|
|
|
|
|
Hi,
Asp.net application is running in the server. How to take my server db backup to the local machine
Thanks
|
|
|
|
|
You have no idea about how things works. How are you expecting the application running on a remote server can communicate with your local machine?
|
|
|
|
|
This is a tricky question. You can use wscript to run shell commands and get this done.
Dim oShell
Set oShell = CreateObject("WScript.Shell")
oShell.run "cmd /C " & strMYLocation & "mysqldump -B " & dbname & " -u " & strMYUser & " -p" & strMYpassword & " > " & strMYBackup & "dbBkup" & strBackup & dbname & ".sql",,true
Set oShell = Nothing
Make sure to grant read/execute/write permissions to the IUSR account over all the involved files and folders. Good luck!
Ranjit Viswakumar
Professional Services Specialist
http://hostmysite.com/?utm_source=bb
|
|
|
|
|
I want promt to collect information and assign it to a string varible in C#. How can this be possible
|
|
|
|
|
The most common way to pass a variable from js to C# is to write it to a hidden field.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
How do you create a hidden field?
|
|
|
|
|
<asp:hiddenfield xmlns:asp="#unknown">
or just
Abhishek Sur
|
|
|
|
|
Can you explain more.
Whats you'r source information?From control?
sepel
|
|
|
|
|
|
To recap
1 - the code is out there, easy to find with google
2 - if you can't understand it, you won't understand anything we give you
3 - if this is paid work, you are a disgrace, if it's a project, talk to your teacher. If it's for fun, buy a book and start more slowly
4 - don't crosspost.
Oh. and I think if I ran a poll, most people would agree with me that it is not urgent at all.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello Friends,
I've a GridView in which i've taken a LinkButton as TemplateField and that's CommandName is "Play". And now i want to print the index value of the row accordingly the Play button of the GridView's row is clicked.
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Play")
{
int index = Convert.ToInt32(e.CommandArgument);
Response.Write(index);
}
}
And i'm getting an error Input string was not in a correct format"
|
|
|
|
|
.NET- India wrote: int index = Convert.ToInt32(e.CommandArgument);
Response.Write(index);
1 - why do you need to convert this to an int to write it ?
2 - your error probably means the input was not an int, which is why you should never use Convert.ToInt32 ( use int.TryParse )
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|