Help Me C# is working But Not working

Edited by SomeNewKid. Please post code between <code> and </code> tags.

Pls, Help me,
It is simple chat programe. My <IFRAME> src is calling the bellow event in C# it is working perfectly.
private void Page_Load(object sender, System.EventArgs e)

string sDealer="";
string sWrite="";
if ( Session["Channel"] != null )
sDealer = Session["Channel"].ToString();
Response.Write( "<meta http-equiv=\"Refresh\"content=\"4\">" );
} code.....
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'Put user code to initialize the page here
Dim sDealer As String = ""
Dim sWrite As String = ""
If (Session.Item("Channel") <> "") Then
sDealer = Session.Item("Channel").ToString()
End If
Response.Write("<meta http-equiv=Refresh content=4>")
sWrite = MyClass.MyChat.GetAllMessages(sDealer)
End Sub

the above VB code is not writting in iframe
solution pls
7/23/2004 2:59:23 AM 93655 articles. 6 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 54

Dear Shekhar,
Change your code as follows:-

Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

Dim sDealer As String = ""

Dim sWrite As String = ""

If Not Session("Channel") Is Nothing Then

sDealer = Session("Channel").ToString()
Response.Write( "<meta http-equiv=\"Refresh\"content=\"4\">" );

End If


Write back if it doesn't work.
7/23/2004 5:15:07 AM

My advice is don't bother with VB ;-)

Steven Bey

Recursion: see Recursion
7/23/2004 11:41:12 AM
Dear thanks,

It is working fine in but the IFRAME Scroll bar doesn't, I have to scroll down manually to see the last line. If you can help me "The message should be in right position to see". In C# the message is in right position i no need to scroll down (IFRAME)
Any property to set or any code to assign -> pls help me Because my application is in i can't change my envi'ment to C# it is very big process to change.
Pls advice me how i proceed.


7/24/2004 4:01:07 AM

Similar Artilces:

Type.GetType does not work in VB.NET but works in C#. VB.NET gurus Please help
Friends,   I am an experienced C# programmer who is working on a VB.NET project now. I am writing different methods covering the following functionalities 1) Take a datareader as input and return an arraylist of class object2) Take an xmlnode (received from a webservice) as input and return an arraylist of class object. The methods are generic methods which take datareader/xmlnode as first parameter and classname (string) as the second parameter. This way it will work trivially. The schema of class object matches with the input (datareader or xmlnode)In C# I used to do th...

Sending SMS using or using or
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul... code works but not c# code
Hello, I'm trying to insert the metatags dynamically. The following vb code works fine: aspx.vb code: Protected myTag As System.Web.UI.HtmlControls.HtmlGenericControl Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load myTag.Attributes("content") = "test" End Sub In aspx file head: <meta id="myTag" runat="server" /> The above code is working great. But the same thing I'm trying to put in C# which is not working. aspx.cs code: ...

System.web.UI doesn't work in VB.Net Form?
 Hi, I downloaded a little example recently and tried converting it to VB.Net.  Surprisingly I found that while my VB Web projects and CSharp Windows Form projects work with System.web.UI, VB Windows Forms don't seem to. Is there any way I can use System.web.UI features with a windows form? This is the code I'm trying to convert to VB:   using System.IO;using System.Web.UI.WebControls;using System.Web.UI;// render the DataGrid control to a fileusing(StreamWriter sw = new StreamWriter(textBox1.Text)){ using(HtmlTextWriter hw = new HtmlTextWriter(sw)) { g...

I cannot get my C#.NET Email Form to work on Godaddy hosting account. Please Help!!!!
Hello;   I have created a contact us page and I am using .NET Mail classes to send the form via email. However I keep getting this error when I upload my info to the hosting server... Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Oh and yes, it wont send any emails. here is my code... using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.Web...

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of developing. The trick is to use the "Src" attribute of the @Page directive. Check out the link if you are inclined. You are welcome to download the code if you are interested further, found at the same link. (Note that the reason that I looked for a way to do this is because I wanted to have the option to include some VB.NET-based demos at my site. Since my site is a C#.NET ASP.NET, I was told that there was no want to do this. Therefore, I looked for a workaround and just happened to find one.) Enjoy (and then get back to work!) you are right !!!mixing languages could cause unknow and uncontrolled problems !!! if a developer has to mix ....the practical way is to create a new project with different language and what will be absolutely fine !!!thanks mkamoski for raising this issue !!Fadil Alnassar | FREE Nodil Tab Controlhttp://www.mefranchisi...

how can i write this line using : container.dataitem ?.... in its not working
Dim container As GridView = CType(newLinkButton.NamingContainer, GridView) Dim dataValue As Object = DataBinder.Eval(container.dataitem, _ColName)   _ColName its just a string a name of the field in my database   This is Vb.Net code man what you want? You can convert any format from this link  If this post is answer of your question then don't forgot to Click Mark As Answer...

Why does this work in VB.NET but not C#?
I'm using the Club Starter Kit and the issue is with the PageNumberer object that implements a WebControl. I've converted it to C# and have most of it working except for the PageNumberer object. Here is the VB.NET code:1 Public Event SelectedPageChanged As EventHandler 2 3 Public Sub RaisePostBackEvent(ByVal eventArgument As String) Implements System.Web.UI.IPostBackEventHandler.RaisePostBackEvent 4 Dim newPage As Integer 5 If Integer.TryParse(eventArgument, newPage) Then 6 7 Me.SelectedPage = newPa...

Both C# ASPX pages and VB.NET ASPX in single VB.NET Web Applcation Template
Hi.. Is it possible to have both c# pages and VB pages in same Webapplication, what i chose is VB.NET Web application Template. With Thanks, Jaya.... I don't see why you couldn't, but for the sake of consistency I don't know why you would want to do this. When you choose a C# or VB.NET application template(I'm assuming you're using VS or WebMatrix), it simply creates a .aspx file that includes a page directive that specifies the page language. If you created a C# template but want to use VB.Net instead, you need to go from: <%@ Page Language="C#" .... to...

converting to from offered me some sample code when I signed up with them the only problem is the sample code is in but my page that they type all of their credit card into is <code><%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="C#" runat="server"> void Page_Load(Object Src, EventArgs E) { myPage.Text = readHtmlPage(""); } private String readHtmlPage(string url) { ...

Access Net work mapped drive VB.NET
Hi I have a docuemnt mangemnt system coded in VB.NET. The system sometimes needs to get documents from Network mapped drive and shared drives. In development machine everything works fine. But when I moved the code to Test serever, it could not access the mapped drives. I tried all security settings. But still could not. I tried unc path, but it throws In valid user exception. Can anybody help m eto solve this issue. Thank you Jikk Hi Jikk, What login is your app running under? Whichever it is, it has to have permission to access the network, which ASPNET doesn'...

.Net 2.0 Web application using is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one web application using which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

after installing web matrix VB.NET web page don't work
I just started with ASP.NET in VB.NET. I had developed a simple web page and it worked fine. Then I installed web matrix and started playing with it. When I go back to VB and try to run the program (that worked before) I get an error: "Unable to start debugging on the web server. Could not start ASP.NET or ATL server debugging." How do I get VB.NET to working again? I'm not sure why your existing Web application don't work after the installation of Web Matrix, as they can live without conflict in fact, did you try to look for an answer from the about the ...

COM works in, not C#??
I am converting a site from asp to  This site uses a COM object and I would like to use C#.  I've included aspcompat=true in my page directive. In, it works great.......Dim oLDS as ObjectoLDS = Server.CreateObject("ldswebapi.Lookup")oLDs.Initialize("C:\LDSDATA")In C#, not so great........Object oLDS = new Object();    // or Object oLDS;oLDS = Server.CreateObject("ldswebapi.Lookup");oLDs.Initialize("C:\LDSDATA");I get error "object does not contain a definition Initialize" I don't get it.  Can I not use C# for this?  jepatte Yeah you can. The problem is that VB.NET is loose. The "object" object doesn't have a method called Initialize. Your object might, but because it is of type object, C# won't recognize it. It is like turning EXPLICIT and STRICT on in VB.NET. You would have to cast your object to a COM wrapper, or Invoke it with reflection.Cheers,       Kevin JonesMy Blog So what is an example of a COM wrapper or Invoke it w/ reflection?jepatte you can add reference your com object in Visual Studio by right click on your project and select Add Preference. Select the dlls you want to use.  This will create an Interop dll. You can try the following  using ldswebapi.Lookup;  ldswebapi.Lookup oLDS = new ldswebapi.Lookup(); oLDs.Initialize("C:\LDSDATA");   Hope this helps...

Catch events in javascript from .NET usercontrol works in VB.Net
I've created a Windows Forms control that I've got working hosted in IE using the implementation found here:;en-us;305624 and here I can access my properties and methods from javascript with no problem.  I tried to raise events in my UserControl and catch them in the HTML with javascript but I couldn't get it to work. The second article above on msdn explains how to source events from C#, but I need to get it working in VB.Net. A... vs vs
just out of curiousity which looks, acts most like java? i'm still learning trying to used to but it seems that it was easier to do some stuff with java. C# is Java++ in my opinion. If you have done C or Jave you will prefer C#.Mike Schellenberger - MCAD If you are looking for language similar to java go for J#. However most code samples you find on the net will be in VB.NET and C#....

same exact code works in but not in C#
can any help me why the same exact code works in but not in C# . case is very simple I have a table called MenuItems which has menu items and a table sizeandprice which has price for each menuitem based on the size. simple case of 1 to many relationship between menuitems table to sizeandprice table. I am trying to display in a gridview control couple of fields from menuitems table and have another template field in which i am display price and size field from the child table which is sizeand price. so basically this is how my code looks like Page in vb works fine <%@ Page Langu...

Change VB.Net string, so that it works in C#
Hi Can someone help me to change this string, so that it works in C#? html = "" & _ "<img src=""" & IMAGE_DIRECTORY & Path.GetFileName(s) & """" & _ "height=""" & imgHeight & """ width=""" & imgWidth & """ Border=""0"" name=""image" & intCounter & """>" & _ "<br>" & _ "<div align=center><span styl...

Trasaction problem (work in C# but not VB.NET)?
Hey!I am building a unit test project and have tryed the transaction in C# like this:   using (TransactionScope oTranScope = new TransactionScope()) { //work to be done oTranScope.Complete(); } This workes grate even when the databas operations is deep down in a object. I have now moved on to imiplement this in a VB.NET project and the code for this is as fallows:  Try Using scope As TransactionScope = New TransactionScope() lUpdateStaffResult = mainte...

what lang does everyone prefer? Thanks, Peter Iuvara, MCP It's a very famous debatable question in forums! I would say if you are from Java/C/C++, then C# would be easy to use for you. If you are from ASP/VB, then VB.NET would be easy for you! As long as if you follow CLS, then what ever the language you use, it's going to be the same for CLR!Sreedharhttp://www.w3coder.orgweblog I would agree with that ... just curious as to what user's on this forum predominantly code in?Thanks, Peter Iuvara, MCP I came from no real programming background, started i...

vb .net or c# .net
I currently develop websites using php but have been requested to develop a site using The question I have is for someone who knows php would it be better to transition to or Thanks, Fr. Robert C# -> There is a converter that will transition about 60% or more of your PHP code to C#. Plus C# is closer to PHP than VB.NET.Jason N. GaylordASPInsider and Microsoft MVP

VB.Net To C#.Net
Hello... Since Last from 1 year i had develope web application in using now i want to transfer from to so what should i do to transform to c# language any link or book related to me through i can easily understand and coding using c# in a short time... Thanks~ Mark As Answer If UseFull ~Kaushal. Hi, you can read the specifications of the language. You're already familiar with .NET and how to program in an OO manner thanks to your experience with The only thing you need to learn is the new syntax of C#. You can also convert parts of your v...

Shell not working in web form but working with windows forms.
Hi! I want to run some exe files (Exa: Internet explorer) using shell command in Its not working if its a web form. But working fine with a windows form. Pls. extend ur help. Thanx. What are you expecting to happen? How are you trying to run the exe files? Where do you expect it to run? Anything run through server side code will run on the server, and in an invisible window, at that. The program will run under the security context of the ASPNET user by default, and so likely will not have the proper authority to do much of what you want, unless you midify its rights...

How To Convert web template to Forms Template
I need  Convert web template to Forms Template   There are some free c# to vb converters out there which will allow you to upload a project and convert it to vb.   The programming models for windows forms and web projects are very different there is no way to convert a web to windows forms project.      Silverlight-helpVb TipsSpace Coast .Net User Group Hey Ajax-y, This tool really helps all programmers. I thought I would share this with you in hopes that you will fine some use for it. Thanks to KamalPatel.Net for this tool. You can see the tool here.  Hope this helps!!    Please give us feedback no matter whether you get your answer.Please "mark as answer" if it's useful for youSincerely,SpongeBert...

Web resources about - Help Me C# is working But Not working -

Working class - Wikipedia, the free encyclopedia
Working class (or lower class , labouring class, sometimes proletariat ) is a term used in the social sciences and in ordinary conversation to ...

Apple working with DOJ to help fight ISIS messaging and propaganda on social media
Apple may be battling one branch of U.S. law enforcement on a terrorist-related issue, but CNN reports that the company is working closely with ...

Kraft Heinz Plans To Boost Working Media by $50 Million
Kraft Heinz will boost working media spend by $50 million in the United States and trim other costs this year, as it makes big bets on cleaner ...

Co-Creating The New Media: How Media Companies Can Renew By Working With Startups?
... rivals. Petri Rajahalme emphasizes that digitalization is one of the key themes of the funding remit. How can digitisation lead to new working ...

Congress working
The Senate is actually working on a real solution to a real problem where technical experts are being listened to, bi-partisan coalitions have ...

Are you working for free on leap day?
February 29 falls on a Monday this year, making it just another workday for most people but do you get paid for that extra day?

Apple said to be working on unhackable iPhone
Stronger encryption might be aimed at heading off the next battle with the US government over gaining access to iPhones.

Herbalife Working On Settlement To Resolve FTC Investigation Into Business Practices
Nearly two years ago nutritional company Herbalife revealed that it was under investigation by the Federal Trade Commission for its often controversial ...

iOS vs. ISIS: Apple working with U.S. government to fight terror
Apple may not be willing to help hack its iPhones for the FBI, but (contrary to certain spin) it’s in no way supportive of terrorism, either. ...

Google is reportedly working with Vizio on Cast-ready TVs
Google has tried reworking Google TV into Android TV, but we're still not seeing the platform embedded in many more new TVs that were announced ...

Resources last updated: 2/27/2016 10:15:24 AM