Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
E

engsrini

@engsrini
About
Posts
193
Topics
66
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Passing communication data between classes and threads in C#
    E engsrini

    I think this approach is Ok, but polling the queue every 10 ms is not a good idea, instead you can create a event in parent class (which holds serial port), the client(the one which is having while loop) can register for it, as soon as the data comes in SerialPort DataReceived event trigger the custom event to client class!

    C# csharp design data-structures help question

  • achive to characters in a string in an other way [modified :D]
    E engsrini

    How about this

    string str = "hello";
    char[] c = System.Text.ASCIIEncoding.Unicode.GetChars(
    System.Text.ASCIIEncoding.Unicode.GetBytes ((str)));

    C# question database

  • How to pass data from client to server in AJAX
    E engsrini

    Ok i got this function from web and it worked

    var encodedHtml = escape(NewsBody_rich.document.body.innerHTML);
    encodedHtml = encodedHtml.replace(/\//g,"%2F");
    encodedHtml = encodedHtml.replace(/\?/g,"%3F");
    encodedHtml = encodedHtml.replace(/=/g,"%3D");
    encodedHtml = encodedHtml.replace(/&/g,"%26");
    encodedHtml = encodedHtml.replace(/@/g,"%40");

    I was thinking about another way to pass the data to server using hidden textbox I thought of putting the formatted html message to a asp hidden textbox and take it in the code-behind using the following script

    document.getElementById("TextBox1").value=NewsBody_rich.document.body.innerHTML;

    but this not working, when i put alert after this script code it shows the TextBox1.Value as assigned html message, but when i debug in the code-behind the TextBox1.Text value is empty. i dont know why?! i did lot of debugging still couldnt able to find, i even replace asp server textbox with html server texbox, still not working!! Do you have any idea why is it so!? Thanks SRini

    ASP.NET help csharp html sysadmin tutorial

  • How to pass data from client to server in AJAX
    E engsrini

    yeah if we appened the formatted html message with quering string, it is not even get called when httprequest.send is happened. Thanks SRini

    ASP.NET help csharp html sysadmin tutorial

  • How to pass data from client to server in AJAX
    E engsrini

    Thanks for the reply, is there any built-in funtion to format the html messges or do we need to need manually parse all tags and convert it to a normal string? Thanks SRini

    ASP.NET help csharp html sysadmin tutorial

  • How to pass data from client to server in AJAX
    E engsrini

    Hi I am creating a chat application using ajax asp .net 2.0, here whenever the user enter the text message and hit enter, i have to pass this message to server in ajax, i am doing it right now using the following code

    url = 'Chat.aspx?action=chatmsg&u=' + userid +'&msg='+ txtMsg;
    
    req = getAjax();
    
    
    req.onreadystatechange = function(){
    //alert("req.readyState  "+req.readyState);
    	if( req.readyState == 4 && req.status == 200 ) {
    		updateAll();
    	}
    
    }
    
    req.open( 'GET', url, true );
    req.send( null );
    

    but the problem is some time the txtmsg (user entered message would be in html code). how to pass html formatted message to server using ajax. Please help Thanks SRini

    ASP.NET help csharp html sysadmin tutorial

  • MultiThreading\Design Question
    E engsrini

    Hi, For more responsive UI in case of multithreading, think about BackgroundWorker class. The class is providing options to intimate the UI about the progress of the thread and thread completion status. Please lemme know if it works.

    C# design question database com performance

  • [Message Deleted]
    E engsrini

    it looks like hez preparing for an interview! ;P

    C#

  • TCp client Question
    E engsrini

    I think i understand what you r saying, you have to wait until u get the response for the command. If there is any request in between (during wait), you have send it right? For that you can use TCP asynchronous send/receive method, but u include a packet identifier eg. PACKET#1 as part of the message, on the receiver end the response should be made with this packet identifier. (like a handshake mechanism)

    C# sysadmin help question

  • Char Arrays and strings
    E engsrini

    wat u trying to achieve here? r u trying read the characters in between the two known string (ABC & JKL) by the way how come the strings ("ABC" AND "JKL") got stored in char array. if all of them are stored in char array, you can form these lettere by just appending them (upto 3 char) and compare it with Known string (ABC OR JKL)

    C# help data-structures question

  • Ajax Postback issue
    E engsrini

    Hi, I am using asp.net 2.0, trying to create chat application. I am copying the user entered text to a asp.net textbox using the following java script function

        document.getElementById("TextBox1").value= "chat message entered by user";	
    userid = location.search.substring( 1, location.search.length );
    url = 'Chat.aspx?action=chatmsg&u=' + userid ;
    
    req = getAjax();
    
    req.onreadystatechange = function(){
    	if( req.readyState == 4 && req.status == 200 ) {
    		updateAll();
    	}
    
    }	
    req.open( 'GET', url, true );
    req.send( null );
    

    with the following asp.net textbox definition

    <asp:TextBox ID="TextBox1" runat="server" AutoPostBack =false ReadOnly=false ></asp:TextBox>

    and i am handling the ajax postback @ chat.aspx like this chat.aspx's page load method

    protected void Page_Load(object sender, System.EventArgs e)
    {
    string chatMsg = TextBox1.Text;
    }

    But the problem is i always see the TextBox1.Text as empty instead of "chat message entered by user" which i copied thru javascript function, but i can able to see in internet explorer that the TextBox1.Text gets updated when i call postback. I put alert before calling chat.aspx like this

    alert("TextBox1 text VALUE = "+document.getElementById("TextBox1").value);

    it is also showing the updated value, but i could not able to see in the codebehind (page_load method) But if i do any postback thru button click, i can able to see the updated vlaue of TextBox1.Text Can somebody help me out.. what went wrong on this? Thanks Srini

    ASP.NET help csharp java javascript asp-net

  • visual C# 2005 exiting
    E engsrini

    the code which i posted can work in both console and windows.. dont confuse with Debug.Writeline satement, it is just used to print in Output Window. ie. private void button1_Click(object sender, EventArgs e) { int x = 5; if (x == 5) { Debug.WriteLine("more code to runs here1"); Debug.WriteLine("more code to runs here2"); if(done) return; // This will exit the funtion button1_Click else { Debug.WriteLine("more code to runs here3"); Debug.WriteLine("more code to runs here4"); Debug.WriteLine("more code to runs here5"); } } Debug.WriteLine("more code to runs here6"); Debug.WriteLine("more code to runs here7"); Debug.WriteLine("more code to runs here8"); } the return statement will exit from the funtion button1_Click. Srini

    C# csharp help tutorial

  • visual C# 2005 exiting
    E engsrini

    int x = 5; if (x == 5) { Debug.WriteLine("more code to runs here1"); Debug.WriteLine("more code to runs here2"); if(done) return; else { Debug.WriteLine("more code to runs here3"); Debug.WriteLine("more code to runs here4"); Debug.WriteLine("more code to runs here5"); } } Debug.WriteLine("more code to runs here6"); Debug.WriteLine("more code to runs here7"); Debug.WriteLine("more code to runs here8"); does it helps? Srini

    C# csharp help tutorial

  • String iterations ....
    E engsrini

    simply superb.. :)

    C# csharp oop help

  • Clear textbox problem
    E engsrini

    Hi remove the semicolon on the following statement if (control.GetType() == typeof(TextBox)); then it should work Regards Srini

    C# help question

  • quick tcp question
    E engsrini

    u can follow the generic format ie. ____________________________ command |length |data |CRC | ------------------------------------- if you are sending as string separate each with a spl char. like "$". or if it is byte array, convert the formated string to byte array using this ASCIIEncoding.GetBytes(stringpkt) qn#2 it is ok to send it as 2 packets, as long as you have identity for packets & also the client must understand ur protocol format. eg. you can maintain one field on the packet to identify "Packet is over or not", if not over, client will listen for rest of the packets regards, Srini

    modified on Wednesday, February 13, 2008 10:12 PM

    C# question

  • architecture
    E engsrini

    What are you talking about, how does creating class depends on architecture?!#@$? i dont understand!! did you mean class digram?

    C# tutorial csharp architecture

  • [Message Deleted]
    E engsrini

    hey..... what do you want, i saw all your messages, its like irritating, please dont spoil the name of your home country and people. try to be polite in asking question as well in answering question. Srini

    C#

  • Problem with HasExited and WaitForExit()
    E engsrini

    Hi Why did you give the wait for exit time as 10000 i.e WordProcess.WaitForExit(10000); if you want the first application to be closed and open the second one do like this WordProcess.WaitForExit();// wait for infinite System.Diagnostics.Process.Start(txt_websiteAddress.Text); And about HasExited property, if any of the word document is open other than the closed document, this property will not get updated. Since Word is single process which launch different instance of editor. Thanks Srini

    C# help announcement

  • Table in Windows Application (C#)
    E engsrini

    Whats wrong with that question, i dont understand why did you ask him to read that book. ASFAIK upto .net 2.0 version winforms doesnt have table control. Have to manage with Panels or use GDI Thanks Srini

    C# csharp html question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups