we can able to display a MessageBox in asp .net without
using any script langages?

Answer Posted / rathika.k

using System;
using System.Runtime.InteropServices;

namespace ExternKey
{
class Class1
{
[DllImport("User32.dll")]
public static extern int MessageBox(int h,
string m, string c,int type);
static void Main(string[] args)
{
string mystring;
Console.Write("Enter Your
Message : ");
mystring = Console.ReadLine();
MessageBox(0,mystring,"Message",0);
}
}
}

Try like this. It will workout without using any Script
Language.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which adapter should you use, if you want to get the data from an access database?

532


In order to bind the data from a data source to the Repeater control what property is set and what method must you call in your code,?

589


What are the differences between code behind and code inline?

510


How can u debug your .net application?

576


Explain asp.net web forms.

555






What is semantic gap?

613


How many ways are there to maintain a state in .net? What is view state?

585


Can I tap into other windows livetm services?

562


How does session work?

504


What does ascx stand for?

501


How does a content page different from a master page?

572


What are the different properties of server control that exists?

560


Explain State management in asp.net

622


What is the difference between session object and application object?

583


Explain code snippet to register exception filters from controller?

619