|
But, i need to give the text dynamically, rather creating many buttons.
Is there any way to create the Image buttons with text dynamically
G. Satish
|
|
|
|
|
Satish - Developer wrote: But, i need to give the text dynamically
Use classes in GDI to draw text over the image.
|
|
|
|
|
You can use a LinkButton control to display both text and an image:
<asp:LinkButton ID="LinkButton1" runat="server" Text="<img src='images/submit.gif' alt='' />Submit"></asp:LinkButton> You can also specify a CssClass if you want to set a background image.
|
|
|
|
|
Thank you for your response..
But it is giving the text on side of the image...
I need text on the image...
Can u say any other method for this??
G. Satish
|
|
|
|
|
Satish - Developer wrote: Can u say any other method for this??
As I stated in my previous post, you can also specify a CssClass if you want to set a background image.
|
|
|
|
|
yes, i tried by using CSSClass by specifying background image but it not getting clarity.
G. Satish
|
|
|
|
|
Satish - Developer wrote: but it not getting clarity
I'm not sure what you mean by not getting clarity but here is the CSS I use on my own site for the buttons:
.button
{
background-image: url(button.jpg);
width: 120px;
height: 40px;
margin: 1px 20px 1px 20px;
text-align: center;
color: #333;
line-height: 26px;
font-size: 9pt;
text-decoration: none;
} You will have to change the width, height & line-height to suit your own image.
|
|
|
|
|
Hii,
Could any one please tell me how to insert values from Dynamically created Textboxes.
I have a web page where i have created one text box dynamically on form load and given one button, when the user clicks on this button one more text box gets added. More and more text boxes can be added in every click of the button.
Now i want to fetch the value from these dynamically created text boxes and insert those values into the database table and also while fetching these values from the database table, all those values should get displayed in the same text boxes from where it has been stored in the database.
Any help will be greatly appreciated.
Thanks in advance
Imran
|
|
|
|
|
You have viestate issue. Dynamic controls created on page load won't maintain viewstate. So whenever you click the button. previous controls will be overwritten. To workaround this issue, create dynamic controls in an event which fires before viewstate is saved for controls. Init event is good. Or use template column in DataGrid/GridView. When button is clicked, add rows.
|
|
|
|
|
hi
1:- how to use javascript validating the textbox in master pages through writting javascipt function in head tag as well from separate .js file?
2:- how to use javascipt validating the textbox in content page through writting javascipt function in head tag as well from separate .js file?
|
|
|
|
|
JS don't have seperation like Master and Content page. It will be treated as a single page.
|
|
|
|
|
i have a public function defined in the .vb class (this file is lying in the App_Code folder).How should i access that public function , if I want to use the same , in any source file of the web page.
Suppose i want to convert the date format , of the column in the gridview . The date format function is declared public , and lying in the vb file under the App_Code folder.How should i access that function
<EditItemTemplate><br />
<asp:TextBox ID="txtindate" runat="server" Text='<%#Format(DataBinder.Eval(Container.DataItem,"indate").ToString())%>'></asp:TextBox> <br />
</EditItemTemplate>
The format function is in the vb file under the App_Code folder
|
|
|
|
|
I doubt this. Try prefixing namespace name.
|
|
|
|
|
Do The AJAX pertains with this issue ?
|
|
|
|
|
pankajgarg wrote: Do The AJAX pertains with this issue ?
I don't think you need AJAX. Try prefixing namespace to the Format function. Every application should have a default name space. Prefix that here and try
|
|
|
|
|
|
What is your question?
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
i have a public function defined in the .vb class (this class file is lying in the App_Code folder).How should i access that public function , if I want to use the same , in any source file of the web page.
Suppose i want to convert the date format , of the column in the gridview . The date format function is declared public , and lying in the vb file under the App_Code folder.How should i access that function
<EditItemTemplate><br />
<asp:TextBox ID="txtindate" runat="server" Text='<%#Format(DataBinder.Eval(Container.DataItem,"indate").ToString())%>'></asp:TextBox> <br />
</EditItemTemplate>
The format function is in the vb file under the App_Code folder
|
|
|
|
|
You need to use the fully qualified namespace to get to the function. Is the function static? If not, you won't be able to access it like this at all.
|
|
|
|
|
|
Hello experts
i would like to know how to delete a row from a dataGrid (which is in edit mode), i am using paging and the built in edit, update, cancel methods.
I have been looking all over the posts most seem to be using databases and since i am using a XML file as my surce of data i am abit lost.
heres what i have in my delete event Handler..
private void dgStudents_DeleteCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
int rowToDelete = e.Item.ItemIndex;
dsStudents.student.Rows[rowToDelete].Delete();
//refresh datagrid control to show changes
BindData();
}
the rowToDelete int will get the row to delete, but when i run this and click on delete, i get a runtime error of "There is no Row at position 0"
Help please??
Cheers
Cheers
|
|
|
|
|
hustler2005 wrote: dsStudents.student.Rows[rowToDelete].Delete();
I guess when page is posted back, you will loose this value. Have you checked the count of rows before issuing delete ?
|
|
|
|
|
Hi.
I created a web services but I cant find it in my application. Its in the local host, and i dont see the web services wen i try to add web reference.
why?
thanks.
|
|
|
|
|
Hello everybody,
I have a gridview where a textbox column is present.I have another column which contain a javascript calender. My gridview is dynamically generated. I want to assign the textbox value through the calender.
|
|
|
|
|
Please do not post multiple times -
Clickty[^]
|
|
|
|