|
There is no implementation for the message box in asp.net like vb.net desktop application
instead u need to use the "window.open" for opening a new window
"window.alert" for messages and "window.confirm" for checking yes/no messges
Hope this would help
Best Regards
3ala2
|
|
|
|
|
i am not getting you question but i think you can display message box bye following code
msgbox("Error occurs",MsgBoxStyle.Information,"Title")
Regards,
DJ Rock
|
|
|
|
|
You can't use a MessageBox in ASP.NET, as that would show up on the server, and the server side of a web application does not have a user interface. Use a Javascript alert:
window.alert('The message.');
---
b { font-weight: normal; }
|
|
|
|
|
You can not do this in asp.net.
You have to use Javascript to do display an alert message.
and the function is->Alert("Message")
Regards,
Suresh Dayma
Everything Is Possible!
|
|
|
|
|
hi
if u r working with asp.net2005 thn u hav to do
add reference to system.windows.forms
at code behind using following :
using system.windows.forms;
and use
<br />
MessageBox.Show("You have been must login to see Demo", "Error", MessageBoxButtons.OK,MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);
and more.................
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
hello friends,
i am trying to add nodes dynamically to treeview but i am getting the procedure.i have tried using xml also.so anybody please help me,its very urgent.
thanking you
prasanna
prasanna
|
|
|
|
|
|
hi friend,
thank you i have already added the nodes dynamically.
you tell me how to add this treeview in a datagrid?
prasanna
|
|
|
|
|
Hi,
In my website, I need to give a popdown menu to the user for various options.
Suppose, the menu options ar as follows :-
Home View Records Reports Exit
1 - Batch 3 - Error
2 - Summary 4 - Valid
5 - Dropped
Where Home and Exit are independent links with no sub menus whereas View Records has sub menu 1 & 2 and Reports has sub menu 3,4 & 5
How do I create this using the new ASP.NET 2.0 menu control. I also need to implement role based security in this. For eg. if a particular menu item is not accessible to a particular role, then either that menu item should be disabled or preferably not rendered at all.
I will be using this control for the 1st time, so pls guide me in how to proceed.
Thanks and best regards
Omkar
-- modified at 1:57 Monday 13th November, 2006
|
|
|
|
|
how to edit and update an datalist in asp.net in c#
|
|
|
|
|
|
Every single one is loaded!
|
|
|
|
|
page init and page load
Best Regards
3ala2
|
|
|
|
|
what are the methods are loaded when page is loaded
vinaykumar
|
|
|
|
|
Dear ALL,
I am facing a bit problem in DATAGRID. so may be you guys can help me
out.
Actually on a DataGrid I am having following controls:
1) 2 DropDown Menu
2) 1 Text Box
3) 1 ADD Button
4) 1 Remove Button
So these all controls are in 1 row and looks like:
DROPDOWN1 DROPDOWN2 TEXTBOX ADD BUTTON REMOVE BUTTON.
So when user will press ADD Button then the same new row will be
populated and will look like.
DROPDOWN1 DROPDOWN2 TEXTBOX ADD BUTTON REMOVE BUTTON (ROW1)
DROPDOWN1 DROPDOWN2 TEXTBOX ADD BUTTON REMOVE BUTTON (ROW2)
And So on. So these rows will be populated until user press ADD BUTTON.
and similarly on pressing the REMOVE BUTTON the corresponding ROW will
be deleted.
I have implemented this functionality. but NOW the REAL PROBLEM comes
into picture.
Actually, when this SECOND ROW (ROW 2 and so on) will be populated
then I have to set the VISIBILITY of ADD BUTTON of FIRST ROW (or
previous row) to FALSE.
SO LOGICALLY SPEAKING this ADD Button should be visible only for the
CURRENT ROW and for all the previous rows the ADD BUTTON's TEXT should
be replaced by a LABEL Control.
I tried to access this BUTTON CONTROL a lot but was unable to do that.
So if you have any idea then please let me know. I am posting the code
for your review. Your help is really appreciated.
public void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
dsSource.Tables.Add(new DataTable("RepeaterSource"));
dsSource.Tables[0].Columns.Add(new DataColumn("DropDownValue2"));
dsSource.Tables[0].Columns.Add(new DataColumn("EditBoxValue"));
dsSource.Tables[0].Rows.Add(new Object[] { 2,""});
datagrid1.DataSource = dsSource;
datagrid1.DataMember = "RepeaterSource";
datagrid1.DataBind();
Session[DATA_SOURCE_KEY] = dsSource;
}
else
{
dsSource = (DataSet)Session[DATA_SOURCE_KEY];
datagrid1.DataSource = dsSource;
datagrid1.DataMember = "RepeaterSource";
}
}
public void OnItemCommand(Object sender, DataGridCommandEventArgs e)
{
if(e.CommandName == "Add")
dsSource.Tables[0].Rows.Add(new object[] {1,"Text Here" });
datagrid1.DataBind();
Session[DATA_SOURCE_KEY] = dsSource;
}
if(e.CommandName =="Delete")
{
dsSource.Tables[0].Rows[e.Item.ItemIndex].Delete();
datagrid1.DataBind();
Session[DATA_SOURCE_KEY] = dsSource;
}
}
HERE IS THE CODE BEHIND PAGE:`
<asp:datagrid id="datagrid1" runat="server" width="288px"
gridlines="Vertical" font-size="8pt"
font-name="verdana" cellpadding="3" autogeneratecolumns="False"
showfooter="True" borderwidth="1px" bordercolor="#999999"
backcolor="White" font-names="verdana" borderstyle="None"
onitemcommand="OnItemCommand"
<columns="">
<asp:templatecolumn>
<itemtemplate>
` <asp:dropdownlist runat="server"
id="comparatorDropDown">
<asp:listitem value="2" text="Select Comparator"
lected="True">
<asp:templatecolumn>
<itemtemplate>
<asp:dropdownlist id="Dropdownlist1"
runat="server">
<asp:listitem
value="citigroup_cfo">CitiGroup_Cfo
<asp:listitem
value="citigroup_cf1">CitiGroup_Cf1
<asp:templatecolumn>
<itemtemplate>
<asp:textbox id="Textbox1" runat="server"
columns="20">
<asp:templatecolumn>
<itemtemplate>
<asp:label runat="server" id="Label1"
visible="true">AND
<footertemplate>
<asp:button text="Add Condition" font-size="10px"
runat="server"
id="AddButton" commandname="Add" width="100%">
<asp:templatecolumn>
<itemtemplate>
<asp:button runat="Server" text="Remove
Condition"
id="RemoveButton" commandname="Delete" width="100%" font-size="10px">
|
|
|
|
|
Hello,
I am completely confused in relation to Themes and CssClass in Asp.Net 2.0.
Consider a custom control (MyControl) that I am creating which composed by:
Panel_01
Table_01
Label_01
Image_01
Hyperlink_01
Panel_02
Label_02
Now, consider I want the text in Label_01 to be different of text in Label_02.
And that I want to format the <a> tags in Hyperlink_01 as follows:
.a, .a:link, .a:visited {color: #950C00; text-decoration: underline;}
.a:hover, .a:active {color: #950C00;text-decoration: none;}
How should I set the SkinIDs and CssClasses in my controls inside my Custom control so I can make this work.
I am asking this because sometimes using Skins seems to be a limit over CSS.
Sometimes I end up using many Skins...
Could someone give me some advice on this?
Thanks,
Miguel
|
|
|
|
|
when i load the app configuration page from the solution explorer im presented with the page that allows you to add app settings, set up security etc..
all very nice, however whenever i click security it tells me that i havent specified a data store and then when i click the 'choose data store' button it takes me to the provider page where im given a 'test' link which then tells me that it couldnt connect to the database.
I know that i need a connection string to the database that i have run aspnet_regsql.exe upon - but why cant i configure this through those pages????
i have to manually add the code into the web.config (which i found on an msdn page).
surely i must be missing a configurastion step here?
---Guy H ( ---
|
|
|
|
|
anyone know about this?
---Guy H ( ---
|
|
|
|
|
Has anybody made a web application attendance monitoring system ..help needed urgently
|
|
|
|
|
Dears
When Im using check Box List with 5 item andd when I user select 2 or 3 out of 5 item
In database only first selected value inserted only ???
(+ this.DaysCheckBoxList.SelectedValue.ToString() + "')";)
Any help
-- modified at 2:43 Wednesday 15th November, 2006
|
|
|
|
|
Hello,
I have a custom control where I have a button.
I need to raise the event FormSubmited after all the code, in
Button_Click, is finished.
The problem is when I check FormSubmited in my page nothing happens:
Private Sub Form_FormSubmited(ByVal sender As Object, ByVal e As
EventArgs) Handles Form.FormSubmited
Response.Write("For Was Submited")
End Sub
My custom control code is as follows:
...
Public Class Contact
Inherits WebControl
Private Sub bSubmit_Init(ByVal sender As Object, ByVal e As
System.EventArgs)
.....
End Sub
Private Sub bSubmit_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
' SOME CODE
' Raise the OnFormSubmited event
RaiseEvent FormSubmited(Me, EventArgs.Empty)
End Sub
Public Event FormSubmited As EventHandler
Protected Overridable Sub OnFormSubmited(ByVal e As EventArgs)
RaiseEvent FormSubmited(Me, e)
End Sub
Protected Overrides Sub CreateChildControls()
AddHandler bSubmit.Init, AddressOf bSubmit_Init
AddHandler bSubmit.Click, AddressOf bSubmit_Click
MyBase.Controls.Add(bSubmit)
End Sub
End Class
Could someone tell me what am I doing wrong here?
Thanks,
Miguel
|
|
|
|
|
Define "nothing happens"
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi,
I added the control to a page and the following code:
Private Sub by27fContactForm_FormSubmited(ByVal sender As Object, ByVal e As EventArgs)
Response.Redirect("http://www.google.com")
End Sub
When I click the button the browser should load the page www.google.com.
Nothing happens. I also tried other things to test the event handler but nothing happens.
What should I do?
Thanks,
Miguel
|
|
|
|
|
ok so I didnt think this would be such a big deal, but Im having trouble (errors etc.)
accessing a on a masterpage, within a user control:
1. masterpage has
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
2. then I have a aspx page that inherits from this master page, I have
<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server">
<uc1:ucsaddlocation id="UcsAddLocation1" runat="server">
|
3. the user control's code-behind has
if (!Page.IsPostBack)
{
RadioButtonList rblLocationHandle = (RadioButtonList) frmAddLocation.FindControl("rblAddLocation");
if (Request.Form["rblAddLocation"] == null)
... etc.
but when I run the page, it says "frmAddLocation" is not valid in this context.
So how do you access a form thats on the masterpage, in the user control?
also, when my default.aspx page, which is part of ANOTHER masterpage, posts to the AddLocation.aspx page, Request.Form["rblAddLocation"] is always null! but Request.Form[4] isnt! how come? thing is, when I use [4], and I go to AddLocation page directly, meaning without a post, it bombs on [4].
now, I can catch it, and move on, but what the heck is going on? how do you use <forms> on master pages and user controls?
thanks in advance!
Moazzam
|
|
|
|
|
Use the "Ignore HTML" option when posting html, or it won't be readable. I have no idea why they chose to not encode the html code in the forum, it's a constant source of problems, but that's the way it works here.
You can't access the control directly from within the user control, as the control is not part of the user control. If you want to access it, you need to do it through the reference to the page object, and cast it to the exact class of the page. This is the opposite of how a user control is supposed to work, though. It's purpose is that you should be able to reuse the control on more than one page, but that's not possible if the user control relies on being used on a specific page.
When you use controls in a container, their client id changes, so you can't use Request.Form with the server id of the control. Look in the generated source code of the page to see what the client name of the control is.
---
b { font-weight: normal; }
|
|
|
|