|
Hi Friends,
Can anyone please tell me how to center allign a text in a label(server control).
Vipin
|
|
|
|
|
Hi Vipin
add this style attribute to your label control either in html mode or through code- label1.attributes.add("style","TEXT-ALIGN: center")
or
<asp:label id....="" runat="server" <b="">style="TEXT-ALIGN: center">
All the best
puranonnet
|
|
|
|
|
Thank u so much Pundeer. Ur answer worked. Once again Thank u.
Vipin
|
|
|
|
|
put that label in a table column and make that table column as center align.
Best Regards,
Apurva Kaushal
|
|
|
|
|
You need to put the l;abel control into the td tag which has an align property and setit to center.Hope this may solve ur problem.
|
|
|
|
|
Thank u so much 4 ur suggestion. I will try it Out..
Vipin
|
|
|
|
|
Yes It solved my problem. Thank u amaneet.
Vipin
|
|
|
|
|
Thank u Apurva. It worked fine.
Vipin
|
|
|
|
|
Hi All,
I have a repeater which contains a textbox. I want to add an event onto the textbox like this
txtComment.Attributes.Add("onkeyup", "return LimitText('txtComment','CharsRemaining',80);")
so that as a user is typing in one of the textboxes, a label will count down showing how many more chars he can type. However, this seems particularly tricky to achieve, as txtComment is showing as not defined as it is in the repeater.
Can anybody tell me how I can get this javascript onKeyUp handler into the textbox?
Many thanks,
Martin
|
|
|
|
|
You can use OnItemDataBound event to achieve that task. In that first you need to find that control and then you add the attributes to that control.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hello Martin
Web controls do not work as a standalone control in a page if it is a child control to some container control like repeater or datagrid etc.
To solve your problem add this code in your repeater controls On ItemDataBound event:
'----------------------------------------------------------------------------
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
CType(e.Item.FindControl("txtComment"), TextBox).Attributes.Add("onkeyup", "return LimitText('txtComment','CharsRemaining',80);")
End If
'----------------------------------------------------------------------------
All the best
Puran
puranonnet
|
|
|
|
|
Thanks both of you. You are quite right, and I have used your code Puran to get what I want.
Best regards,
Martin
|
|
|
|
|
Hello,
Do we need to copy .cs files wile deploying ASP.NET 2.0 Website? I could not find any DLL created there in Bin folder. What is deployment process for ASp.NET 2.0 website project?
Thanks in advance
- ashish
|
|
|
|
|
No, you don't need to publish the source files. Use Publish Web Site from the Build menu, or for more options, download the Web Deployment add-on for Visual Studio, and add a deployment project to the solution.
---
b { font-weight: normal; }
|
|
|
|
|
HI , where should i declare these three things ?
try to be good if you can't be the best
|
|
|
|
|
Man, you need to ask more specific questions. The answer to this could be anything.
|
|
|
|
|
|
Isn't this basically the same question as the one you posted six minutes earlier?
---
b { font-weight: normal; }
|
|
|
|
|
HI Guys , i don't know what is going on , don't be angry if i post some stupidequestions but i'm a VB.Net prog & i want to be also a good programmer in ASP.Net i need just help to get basic things
i used to declare the global or the public variables which i want to use in all the programme in the module , but here when i declared those variables in the modules it seems like it doesn't know them
do you know where is the problem , i hope it is not on me
try to be good if you can't be the best
|
|
|
|
|
dont worry no question is stupid if you post it once... and we all here to help you...
can you give example wot u declaring or wot you want to do... thanks
Nav.
|
|
|
|
|
of course i can declare ,
i declared that like this
Public con as new sqlconnection
Public Adapter as new sqldataadapter
Public DtSet as new dataset
i decloared all that sh*t in the Module but seems doen't work , i don't know why ?
everything is declared public
when i try to use those variables in ma pages ,supposing i want to use the connection like this :
i declared the connection in the module but i didn't set the provider & the datasource ,, now i want to set them in the firstpage ok ??
so i have to do like this
Con = new sqlconnection ("workstation ........")
but the problem is that the Con appear underlined hat mean it doesn't know it
understand ? i hope so
try to be good if you can't be the best
|
|
|
|
|
you didn't tell me how can i see tht DG ?
thank you
try to be good if you can't be the best
|
|
|
|
|
in order to see the DG u need to open ur eyes jus joking
most common reason for not displaying the DG is empty data source. for that you can set the DG header to atleast dispaly it on page which some one already suggested.
Nav.
|
|
|
|
|
yeah , but this one said that i have to add columns isn't it ?
i tried to add some columns ,, but by default the DG has already 3 columns , so when you add an other one it add with those 3 others & the DG still not appear .
i forgot to say that i'm using VS 2003
try to be good if you can't be the best
-- modified at 7:18 Monday 24th July, 2006
|
|
|
|
|
you didn't tell me why the module didn't work
try to be good if you can't be the best
|
|
|
|