|
i try this code but this not worked properly.
Button but = new Button();
but.Text = "Full Detail";
but.ID = "Full_Detail";
t.OnClientClick += new System.EventHandler(fullDetail);
Panel1.Controls.Add(but);
private void fullDetail(object sender, EventArgs e)
{
SearchResult.InnerHtml = "Hi";
}
|
|
|
|
|
Your click event will not fire unless the button is added before the page load event.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
when did you add the button.
check this, itw working fine
protected void Page_Load(object sender, EventArgs e)
{
Button b = new Button();
b.Text = "Dunamic";
b.ID = "myid";
b.Click += new EventHandler(b_Click);
Panel1.Controls.Add(b);
}
void b_Click(object sender, EventArgs e)
{
Response.Write("Dynamic Button");
}
|
|
|
|
|
thank
this code button load in page_load
but i have a button. then click on button i want to create a new button
and then i click on new button than show message "Hi";
|
|
|
|
|
prakash_adysoft wrote: this code button load in page_load
yes
prakash_adysoft wrote: have a button. then click on button i want to create a new button
as Chirs say, you have register event before page load.
|
|
|
|
|
I think its better to creat to do this functionality in Page_init rather than Page Load
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
Hello!
I have a problem IIS not Support to .Net FrameWork directly. How can i code in ASP.Net2005 with IIS of Xampp(Aachi Server).
Regard
Sohail
|
|
|
|
|
Sohial A Rana wrote: I have a problem IIS not Support to .Net FrameWork directly
what does it mean ? how did you know that ?
|
|
|
|
|
Sohial A Rana wrote: How can i code in ASP.Net2005 with IIS of Xampp(Aachi Server).
I don't know that you can. IIS is your best option.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have created a dsn for sql server database. Now how do I code to open my database table to retrieve and save records in my table? Reply fast.
|
|
|
|
|
SSN wrote: I have created a dsn for sql server database
Why your are creating DSN for SQL Server ?
SSN wrote: Now how do I code to open my database table to retrieve and save records in my table? Reply fast.
Serach Google . Just learn Basic of ADO.NET
|
|
|
|
|
please tell me how code asp.net with vb using DSN of sql server 2005
|
|
|
|
|
Google is not working there ??
|
|
|
|
|
please tell me the sample code of connecting sql server database to my asp.net web application using vb
please..... reply fast...........
|
|
|
|
|
SSN wrote: tell me the sample code of connecting sql server database to my asp.net web application
While asking this type of Question , please Search google First. this is very simple and basic Question.
Any way Try This link
Ado.net + VB.NET Code[^]
SSN wrote: reply fast...........
You are not paying us. so dont post like that .
Good luck
|
|
|
|
|
|
Hi..
I am having a function getcities()in codebehind. I am writing javascript in aspx page and calling this function from javascript like this...
<% getcities(); %>
This wrks fine. But now i want to pass parameters in this function. So if i give
<% getcities(cityname, statename); %>
den it gives error - cityname & statename does not exist in current context. Here i have 2 var cityname & statename. can anyone tell me wat is the problem in this.
Thnku in advance...
|
|
|
|
|
When did you call that function ? in any event means some button click or what ?
|
|
|
|
|
hi ,
i ve 2 level menu tabs in asp.net page. in that i want to activate particular menu and sub menu on page load........
Ashok
|
|
|
|
|
Dear friendz,
I am binding morethan 100 records in to a dropdownlist control in my web project.
If I click the dropdownlist, It is showing more than 25 data with vertical scrollbar.
It is not feeling good to look.
I want to customize the displaying records.
It should display only 10 records with vertical scrollbar.
What I have to do? Pls help me
Thanks in advance
Balasubramanian K.
|
|
|
|
|
while adding records in Dropdown list, just add only 10 records that's it.
now what abot rest other ?
while retriving data add all in a dataset that you can use later rather than re-retreiving for DB or other data source.
Thanks
|
|
|
|
|
Thanks for your reply first.
But I dont get clear so far. I am coding like this. I am binding data by using dataset. This is my sample code
Dim dsCode As New DataSet
Dim strSql As String = String.Empty
strsql = "Select Code, Name From UsersList"
If sqlCon2.State = ConnectionState.Closed Then sqlCon2.Open()
Dim sdaCode As SqlDataAdapter
sdaCode = New SqlDataAdapter(strSql, sqlCon2)
sdaCode.Fill(dsCode)
ddlCode.DataSource = dsCode.Tables(0)
ddlCode.DataValueField = "Code"
ddlCode.DataTextField = "Name"
ddlCode.DataBind()
If sqlCon2.State = ConnectionState.Open Then sqlCon2.Close()
What I have to do?
Balasubramanian K.
|
|
|
|
|
where did you add the data in dropdown list ?
|
|
|
|
|
I fill the data in to my dataset(dsCode) and then add in to dropdownlist (ddlCode).
strsql = "Select Code, Name From UsersList"
ddlCode.DataValueField = "Code"
ddlCode.DataTextField = "Name"
ddlCode.DataBind()
By this way only, I can bind the data in to drop down list.
Balasubramanian K.
|
|
|
|