Hi, Try like this. btnRem.Attributes.Add("onclick", "window.showModalDialog('frmCustomerRemarks.aspx','BaseWork','dialogWidth:400px;dialogHeight:400px;center:no;');") bye Pessi.
Prasad Babu A
Posts
-
Grid button click event -
Grid button click eventHi, U need to write button code in DataGrid_ItemDataBound() event; In that event, 1st find that button and then write code like this. private void DataGrid_ItemDataBound() { Button btn = (Button)e.Item.FindControl("Button1"); btn.Attributes.Add("OnClick","window.open ('ss.aspx','sample');"); } I hope this will helps u. bye Pessi.
-
Uploading Multiple FilesHi, U can upload multiple files. For that u need use ArrayList for storing HTML FileField controls. Later u traverse ArrayList and upload the files. Bye Pessi.
-
Database TriggersHi, If u need to achieve ur requirements. U need to use Window Services or shedulars. WindowServices r very easy. Try to use that one. Bye Pessi
-
type ahead in dropdown listHi, We can do like that. but we have to use 3rd party control or AJAX methods. find for DBCOMBO, this is 3rd party tool. u can use with free-of-cost. try to find DBCOMBO or open www.dbcombo.com I hope this will helps u lot bye Pessi.
-
Dropdown clickHi, First u need to set AutoPostBack=true, then u have to write Code for SelectIndexChanged event. Then only it will works. Bye Pessi.
-
asp.net problemHi, Better to store in one field at DB. U can use 1 for CheckBox Selection and 0 for CheckBox unselection. U can store that field value like 1,1,1,1,0,0,1...etc. This is very easy.. bye Pessi.
-
Dropdown and Radiobutton IndexHi, Plz find C# code. public int getIndex(RadioButtonList ddList, string val) { int i; string str; for (int i = 0; i <= ddList.Items.Count - 1; i++) { str = ddList.Items(i).Value.Trim; if (str == val) { return i; } } return 0; } public int getIndex(DropDownList ddList, string val) { int i; for (int i = 0; i <= ddList.Items.Count - 1; i++) { if (ddList.Items(i).Value == val) { return i; } } return 0; } I hope this will helps u. Bye Pessi.
-
Dropdownlist box and Radio Button DisplayHi, U can code like this. ddl.SelectedItem.Text = "three"; or ddl.Items.FindByText("Three").Selected = true; I hope this will helps u. Bye Pessi.
-
remove listbox itemHi, Sorry, This is the code, i forgot items. ddl.Items.Clear(); //To Delete all ddl.Items.Remove("Sample"); //To delete particular Bye Pessi.
-
remove listbox itemHi, DropDownList/ListBox has Clear() method. U can use that method. ddl.Clear(); //To delete all items. ddl.Remove(x); //To delete perticular item Bye Pessi.
-
(Very Urgent)server control events are not firingHi, Check once at InitializeComponent() method. In that check for ur button or linkbutton handler. private void InitializeComponent() { this.ddl.SelectedIndexChanged += new System.EventHandler (this.ddl_SelectedIndexChanged); this.Load += new System.EventHandler(this.Page_Load); } Bye Pessi.
-
Dropdownlist selected ItemHi, how ur populating dropdownlist, 1st check that one. if u r populating at page_load, plz write ur code under this condition if(!IsPostBack) { //populate ur DropDownList } then u can write string selvalue = ddlItems.SelectedItem.Value; txtName.Text = selvalue; in SelectIndexChanged event. Bye Pessi
-
What is AJAX?Hi Friends, What is Ajax? what is importance of it? plz explain me? Thanks Pessi.:)
-
dropdownlist SelectedIndexChanged not firingHi, If u want SelectIndexChanged method to run, u need to set AutoPostBack property of DropDownList to true. Then only it will fires. Try this, it will helps u... aspx ----
codebehind: ----------- public partial class index1 : MC.Web.webPagebase { protected void Page_Load(object sender, System.EventArgs e) { if(!IsPostBack) { DropDownList1.DataSource = mc_type.GetAllTypes(); DropDownList1.DataTextField = "TypeText"; DropDownList1.DataValueField = "TypeAbbrev"; DropDownList1.DataBind(); }//end-if } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { Label1.Text = DropDownList1.SelectedItem.ToString(); } Bye Pessi.
-
Padleft MethodHi, At ItemDataBound() method, u can achieve this one. Suppose int a = 10; Response.Write(a.ToString("000000")); like this u can bind to DataGrid At ItemDataBound() mentod. Bye Pessi.
-
Data BindingHi, U can do it. But need u need to write lot of code. Bye Pessi
-
DropdownlistHi Lavanya, U can populate the DropDownList in Page_Load or anyothers methods. otherwise u need to write javaScript functions. Bye Pessi.
-
Javascript - Alert and Redirect???Hi, I tried with ur code, its working fine. Try in new applicaiton. Bye Pessi.
-
HELP needed!!Hi, I think ur using Server.MapPath() don't use that one. U can use directly those paths. if u use MapPath(), i will goes to ur application path. Bye Pessi.