|
You need to create a new window with the required buttons and show it. I think, creating it on a DIV and showing the DIV will also work.
|
|
|
|
|
Hi friends,
Thanks for your reply.. i tried and it is working , pls find code below:
private void button1_Click(object sender, System.EventArgs e)
{
int Result = 0;
Result = (int)MessageBox.Show("This is a Message box!",
"Message Box", MessageBoxButtons.YesNoCancel,
MessageBoxIcon.Information,
MessageBoxDefaultButton.Button1,
MessageBoxOptions.DefaultDesktopOnly);
if (Result == (int)DialogResult.Yes)
{
textBox1.Text = "You clicked Yes";
}
Regards,
Arpita
|
|
|
|
|
Damn, you were asking for windows applications?
|
|
|
|
|
Wow - so the core issue is that you are clueless. This is not ASP.NET code, ask in the right forum in future, you were given the right answers for this forum.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Well, with all due respect, I don't think that's true.
Assuming, by MessageBox, in JavaScript, we mean the alert class, there are two more classes that behave very much like alert. And those are confirm and prompt, except you do get "more buttons" on them
I know the author of the original post confused two concepts, but saying "it can't be done" on webforms is not quite right, either.
The MessageBox class in C# would not work with webforms, agreed.
But there are alternatives (limited though, as they are).
Regards,
Greg
var question = (_2b || !(_2b));
|
|
|
|
|
Greg Chelstowski wrote: But there are alternatives
That is what already suggested, right?
|
|
|
|
|
Erm, sort of, but you never mentioned any modal dialog boxes
Look, I didn't mean to start a war, I just pointed out that web browsers do have their own dialog boxes, which you can bring up with javascript. And two of them resemble, to a remarkable extent, two of the Winform C# MessageBox.Show method overloads.
Let's just drop the subject, it's definitely not worth fighting over this
Regards,
Greg
var question = (_2b || !(_2b));
|
|
|
|
|
Greg Chelstowski wrote: it's definitely not worth fighting over this
Never thought about fighting.
|
|
|
|
|
Well I did!
Cheers.
var question = (_2b || !(_2b));
|
|
|
|
|
Hi sir,
How can i send mail in asp.net.
Can we use encryption algorithms in login page? how?
|
|
|
|
|
M.Ambigai wrote: How can i send mail in asp.net.
Using the classes provided in System.Net.Mail[^]
M.Ambigai wrote: Can we use encryption algorithms in login page?
System.Security.Cryptography has got many classes to work with encryption. What do you mean by using encryption algorithm in login page? Are you trying to encrypt the password?
|
|
|
|
|
yse sir, i have to encrypt my password
|
|
|
|
|
dear friends ,
i need voice mailing project in asp.net 2005
|
|
|
|
|
Why dont you code it yourself ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
skumar_sect wrote: i need voice mailing project in asp.net 2005
Ok[^]
|
|
|
|
|
hi i am designing a web site in which i want to execute different ACCESS queries after a specific time interval ex:- 5 SECONDS.
I am using ASP.net with C# and access as database.
Thanks in advance!!
|
|
|
|
|
I would look into writing a windows service that runs in the background to perform such a job, rather than trying to write it as part of a web site. A service is autonomous, and can be guaranteed to be executing so your job will run on the appropriate schedule. Its difficult, if not impossible, to make such a guarantee from a job triggered by an ASP.NET process.
Just a word of warning...executing a query every 5 seconds against a database could cause problems with performance and load. It might be better to reevaluate why you need such a job, and perhapse approach it in a different way (one that does not involve executing queries against an access database every 5 seconds). A windows service could still provide a host for your job.
|
|
|
|
|
|
Why do you need an update panel for this ? If you do it entirely in local javascript, you could use firebug or similar to debug it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
As I said I was new to ASP .NET and your comments did not lead me to an answer just more questions ( I am not familiar with firebug?). I began trying this without updatepanels and I followed the suggestion to use the updatepanels to eliminate the need for significant coding to achieve the asyncronis updating. Both methods have rendered the same exact results, the image does not refresh even though the imageurl has been changed.
|
|
|
|
|
Here is how you might try this...
Mater page aspx
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
</asp:ContentPlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
Master page code behind
public partial class Site1 : System.Web.UI.MasterPage
{
public UpdatePanel UpdtPanel1
{
get { return this.UpdatePanel1; }
}
public UpdatePanel UpdtPanel2
{
get { return this.UpdatePanel2; }
}
protected void Page_Load(object sender, EventArgs e)
{
}
}
Content page
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
Put your map here
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
Image here
</asp:Content>
In code behind
protected void Page_PreRender(object sender, EventArgs e)
{
if (!IsPostBack)
{
Site1 obj = (Site1)this.Master;
AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
//Sets the control that will trigger a post-back on the UpdatePanel
trigger.ControlID = this.MapControl.id
//Sets the event name of the control
trigger.EventName = "Click";
obj.UpdtPanel1.Triggers.Add(trigger);
obj.UpdtPanel2.Triggers.Add(trigger);
}
}
I didn't get any requirements for the signature
|
|
|
|
|
this is interesting and I will give it a try, but my current Masterpage does not have the updatepanels in it, they are in the content pages. I utilize the master page for multiple pages in the website I am building. Which I believe will require a different solution. I can create a different masterpage if necessary.
Clay Aldebol
|
|
|
|
|
Does anyone have an anwer to this problem? It seems to me that there is a timing issue involved here since the textbox updates but the image does not. Surely I am not the only person that has tried to update a imageurl in an updatepanel? This seems that this should be straight forward using updatepanels, so is there a problem with updatepanels and timing of triggers?
|
|
|
|
|
|
Th javascript someone gave you last time you asked, a matter of minutes ago, looks fine to me. how about sticking to one thread and asking further questions if you can't work out what to do with the answer you were given ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|