|
Thank you for the answer.
I will use the Convert method as you said.
"no xe tuto oro quel che luse"
rechi+
|
|
|
|
|
See this sample:
Encoding source = Encoding.GetEncoding(1252);
Encoding target = Encoding.UTF8;
byte[] input = new byte[1] {0xE9};
byte[] output = Encoding.Convert(source, target, input);
string result = Encoding.UTF8.GetString(output);
Console.WriteLine(result);
|
|
|
|
|
Encoding.Default mite be handy
|
|
|
|
|
Hi,
I'm using Visual Studio.Net 2005 with Crystal reports. I tried the tutorial on Publishing and consuming a report as a webservice from MSDN. When I run the windows form, I get error messages saying that the report failed to load. It works fine if I give the file path to the .rpt file, but when its been published as a webservice and I give the URL, I get the error. I have the required sample reports and database(MS Access Db). I get the same problem when I try the tutorial about populating a combobox (Windows form) with reports from a webservice. I get the list of reports, but when I try to display the report, I get errors saying the report cannot load.
If anyone knows, plz let me know.
Thx,
Mahesh
|
|
|
|
|
hi there,
i have an application with a local database,now i want to transfer datas to a server using cable modem(for security reasons),how can i do this?
i have read some articles on tapi but couldnt use them.
|
|
|
|
|
Hello...
I don't know how exactly cable modem works, but I think it works like a DSL modem. DSL modem can connect only to a DSLAM. You cannot connect directly DSL modem to DSL modem. That means you must use a good old analog modem (56k modem) or you can use VPN. Just use the VPN function from Windows XP.
|
|
|
|
|
hi,
i want to transfer the data in my app using codes not using an external app.
|
|
|
|
|
Ok... that means you don't know anything about VPN.
VPN is an encrypted network in the internet.
You must first make a connection using Connection Wizard in Windows XP.
Then you can see that Windows XP has created a new network. And you see, that your client and your server got a new IP address. For example : 192.168.0.1 and 192.168.0.2
Then you can send your data (or whatever) through this IP. You can work with your code normally. Your data with automatically encrypted from client to server.
|
|
|
|
|
hi,
I know everything about VPN and so but i want to connect by modem and i dont want my user concern about vpn,internet and so,I want to make connection using modem in my source code and handle everything automaticaly,in fact i have some stupid users and they know nothing about internet or network.
|
|
|
|
|
Then find out how to create a VPN from code
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
It's quite obvious that you don't know how a cable modem works.
You can't use it to "call" another cable modem, or a server for that matter. It will only connect to the cable company service, and supply you with a connection to the Internet. You don't get to tell it where to connect or how. It is mearly a part of the cabling medium that your IP traffic travels over, which your application shouldn't care about at all.
The only way you're going to get a secure connection to your server is to have a VPN tunnel setup between your two networks. How you code builds this tunnel is entirely up to the VPN solution your using. There is no support for this in the .NET Framework.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hello
i have a server where i make a thread to proccess some data. i a time a send some data to the client and i need a response from him. i received the respons from client in server in event OnReceived, but i don't know how to pass this data to the thread. in fact in the thread i want to make a function byte[] SendAndReceived(Byte[]).
in my opinion in the thread i need a new event ThreadOnReceived() where to pass the event(data) received in server OnReceived(), but i don't know if this is a good ideea, and i don't know how to implement it.
thanks,
Mihai
|
|
|
|
|
Your assumption is correct.
You should either expose an event, or pass a delegate.
delegate void DataReceivedHandler(byte[] data);
void Loop()
{
while(true)
{
if (DataReveived != null)
{
DataReceived(data);
}
}
}
void OnDataReceived(byte[] data)
{
}
void StartLoop()
{
DataReceived = new DataReceivedHandler(OnDataReceived);
Thread.Start(new ThreadStart(Loop));
}
|
|
|
|
|
hai,,,
is there any particular function by which i can directly use unicode in API..
for eg:
StaticObjects.[lIndex] = "बीच की रेखा";
"बीच की रेखा" is language hindi.. but when i run the code, instead of hindi it shows "??????" in those places... how can i solve this...? while debugging it for the first time its showing warning-----
"some unicode charecters in ths file could not be saved in the current code page. Do you want to resave this file as Unicode in order to maintain your data?"
how to solve this
|
|
|
|
|
The .NET Framework is using Unicode.
You need to check:
1) Is your source file actually saved as Unicode (if you can open the file again and the text is fine, it is saved in Unicode). If not, manually save the file with Unicode - Advanced Save Options on the File menu in VS2005)
2) Where are you outputting the text. The Console will NOT run Unicode by default (you can try to mess with the command "chcp").
|
|
|
|
|
hai..
yes the files is saving as unicode only.... i am displaying this in an ordinary form, which is a child form to a main form. i tried in a single form on button click i am able to disply the value. but on formload i am not able to display it.? can u help me out in this... thanks in advance...
Regards
|
|
|
|
|
If you save the source as UTF-8, try UTF-16 instead. No, it should not matter, but you should not have the problem in the first place.
Besides that I can't really offer any help as I do not even know HOW you are trying to display the text (caption of a dialog, messagebox, TextOut in draw command, label control, etc.
|
|
|
|
|
Hi,
I created scrollbars for my datagrid in asp.net successfully but I was not able to create a fixed column head. Any helpful hints?
thanks
|
|
|
|
|
You can do it via styles,
.DataGridFixedHeader
{
font-family:Arial;
font-size:x-small;
font-weight:bold;
POSITION: relative; TOP: expression(this.offsetParent.scrollTop - 2); BACKGROUND-COLOR: lightgrey
}
use this style for your datagrid header.
|
|
|
|
|
It is not doing it I already tried that.
|
|
|
|
|
So how did you create scroll bars for your datagrid? Are you using a div tag for creating them? If you have tried using css, how did you use the css class for your header?
|
|
|
|
|
I have used the div tags yes. the style tags and what is with in them is in the head.I do not have a css class, but I put the cssClass name as DataGridHeader since it is within the style tags. My code looks like this:
****beg div (assume that 'div' is written before style = "left")
<style="left: 18px;="" overflow:="" auto;="" width:="" 66%;="" position:="" absolute;="" top:="" 248px;="" height:="" 100px"="">
<asp:datagrid id="DataGrid1" style="Z-INDEX: 164; LEFT: 18px; POSITION: absolute; TOP: 248px"
="" runat="server" bordercolor="Black" width="776px" height="56px">
<alternatingitemstyle font-size="Smaller" font-bold="True" backcolor="ControlDarkDark">
<itemstyle font-size="Smaller" font-bold="True" forecolor="White" backcolor="Black">
<headerstyle font-size="Smaller" font-bold="True" horizontalalign="Center" forecolor="Black"
="" backcolor="White" cssclass="DataGridFixedHeader">
** end div
.DataGridFixedHeader { POSITION: relative; ; TOP: expression(this.offsetParent.scrollTop - 2); BACKGROUND-COLOR: white }
-- modified at 15:23 Tuesday 18th July, 2006
|
|
|
|
|
Hi Naji ,
I have used the style in an external stylesheet and the class is as follows:
.DataGridFixedHeader
{
font-family:Arial;
font-size:x-small;
font-weight:bold;
POSITION: relative; TOP: expression(this.offsetParent.scrollTop - 2); BACKGROUND-COLOR: lightgrey
}
Linking the style:
The aspx code is:
<asp:datagrid id="dgForDelete" runat="server" width="100%" bordercolor="DarkGray" borderstyle="Solid" allowsorting="True" cellpadding="3" autogeneratecolumns="False">
<headerstyle font-size="Smaller" font-bold="True" wrap="False" horizontalalign="Left" cssclass="DataGridFixedHeader">
|
|
|
|
|
Thanks man. I moved the datagrid to the top of the scroll bar boudary and I put the style in the head. I also used the CssClass = "DataGridFixedHeader".
It works now.
|
|
|
|
|
Glad to know that
|
|
|
|