|
Actually i wanted to disable the image and by mistake i said image button.
dou knw how to do it?
Riz
|
|
|
|
|
But where are you Populating the Image On which control you are showing the image
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
On A href of the image i am opening a new popup calendar.
In sum cases i dont want the image to disabled so that the popup window is not opened.
Riz
|
|
|
|
|
OK
Use asp:PlaceHolder in the page OK
put the link in between the placeholder
Only what you have to do is disable that placeholder whenever you want ok
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
You could try javascript
<code>document.getElementById('<%=ImageButton1.ClientID%>').disabled = true;</code>
Where imageButton1 is the id of your image button
HC
Best Regards,
Haissam Abdul Malak
My Blog
|
|
|
|
|
You can do it by first casting it into Webcontrol, then setting the enabled property as false.
e.g.
((WebControl)(imgButton1)).enabled = false ;
njoy...
|
|
|
|
|
Apply a style display:none;
|
|
|
|
|
I have an SQL datasource hooked up to a stored procedure. I am succesfully retrieving data and showing it in a data list. I would like to make the data list sortable. I have created links in the header section of the datalist and these also succesfully trigger events. I have also built the stored procedure to accept a sort parameter which would allow the results to be sorted on any criteria.
Ok so I have everything set up and working that I need. My problem now is how, on triggered sorting events, do I alter the sqldatasource, to pass the sort parameter back to the database. I have played with the SortParameterName="" property to no avail.
Thanks in advance.
|
|
|
|
|
Did you condsider sorting client side?? Or even sorting the result set retrieved from the sp??
|
|
|
|
|
|
Hi,
What is meant by DataView in .net. In which conditions do we use it. pls explain in detail
Regards
Vijay.
|
|
|
|
|
|
Hi,
I'm having a problem with when ever I use Message or messageBox in asp.net I always get this error:
The type or namespace name 'Message' could not be found (are you missing a using directive or an assembly reference?)
Is it possible using them in visual studio.net2003? if not what could I use?
Thanks.
|
|
|
|
|
r u using the message board which is for another project?
you may change the namespace " Message " to the name space whis is for ur real project.
|
|
|
|
|
In asp.net, there is no MESSAGEBOX like windows application. though using javascript, you can send a message to the user example below
Modify your body tag like below
<body onload="alert('this is a test')">
HC
Best Regards,
Haissam Abdul Malak
My Blog
|
|
|
|
|
You need to use a clientside JavaScript (alert ) to show messageboxes.
|
|
|
|
|
Thanks everyone,
I've managed to make it work. But I now found a new problem I have to put Smallimages in front of RadioButton. How could I go about this?
Thanks
|
|
|
|
|
hai friends,
How to access the value of the Dynamically created control in asp.net (c#)?
suppose i create
void page_load()
{
TextBox t1=new TextBox();
form1.Controls.Add(t1);
}
Now i want to insert the value of the textbox in the database,but ID of the TextBox not known.
void insert_click(Object o,Sender e)
{
String s1=insert into table4 values(here i want to access the ID of the TextBox);
//Sql Connections.........
}
plz,Reply if u have known.Thank u Friends.
|
|
|
|
|
Hi,
When you create the control i.e. the textbox control, assign a value to the 'id' property of the textbox.
like...
Textbox t1=new TextBox()
t1.id="txt...."
form1.controls.add(t1)
later in your code you can access the textbox using this id.
Rate this message
Gautham
|
|
|
|
|
hai Gautham sir,
i already tried like that,
TextBox tt=new TextBox();
tt.ID="TextBox1";
but it gives compiletime error that "No such TextBox1 Control available" (that error locates the-- insert_click())
void insert_click()
{
String str="insert into table4 values('"+TextBox1.Text+"')";
SqlConnection..........
}
bcz only in the runtime the ID 'TextBox1' assigns to the dynamic control(TextBox) then how we can specify the name during Compilation.
try like that surely u got the error,plz help me sir.
-- modified at 4:32 Tuesday 6th March, 2007
|
|
|
|
|
Make sure that the textbox which you created is not private to any event. It should be protected or public so its accessible to all events of the aspx page
Gautham
|
|
|
|
|
sir,
i made the page_load as public,then the results shown below.
public partial class Default2 : System.Web.UI.Page
{
public void Page_Load(object sender, EventArgs e)
{
TextBox t1 = new TextBox();
t1.ID = "TextBox1";
form1.Controls.Add(t1);
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Server=localhost;uid='sa';pwd='sa';DataBase=master");
SqlCommand com=new SqlCommand("insert into table1 values('"+TextBox1.Text+"')",con);
SqlDataReader rr=com.ExecuteReader();
}
}
----------------------------
CS0103: The name 'TextBox1' does not exist in the current context
Line 24: {
Line 25: SqlConnection con = new SqlConnection("Server=localhost;uid='sa';pwd='sa';DataBase=master");
Line 26: SqlCommand com=new SqlCommand("insert into table1 values('"+TextBox1.Text+"')",con);//this line in Red Color(error portion)
Line 27: SqlDataReader rr=com.ExecuteReader();
Line 28:
|
|
|
|
|
Ok
System.Web.UI.WebControls.TextBox control = (System.Web.UI.WebControls.TextBox)this.form1.FindControl("COntrolID");
This may help you
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
hi,
lets say i have a an application which has few pop ups. However by default the browser denies the popups.
So is there a way that i can provide settings to my application that it should allow popups for the specific application.
Can we do this thru .net???
Gautham
|
|
|
|
|