|
i am using asp.net + C#
in my page i use label for "Bio post" ,to display.If the user enter datas like "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"etc. with out enter any space. the alignment problem will occur .i want to display all the details like
"aaaaaaaaaaaaaaa"
"aaaaaaaaaaaaaaa"
"aaaaaaaaa"
.Is it possible.I dont need scroll bar in that. if the text not fix in specified width of that label it will come next line.
for eg:in gmail if we type subect only letters like "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 " but when we open it the subject display properly like
"111111111111111111111111111111111111111111111"
"111111111111111111111111111111111111111111111"
"111111111111111111111111111111111"
is any way to solve like this .and this fix in page width.
I use text box to display data .but i dont need that scroll bar when we set wrap="true".i need to display all the details with out scroll bar.
|
|
|
|
|
You mean textbox will automatically adjust its height on user entry ??
I think you need to use Javascript to do this.
<html>
<head>
<script>
function adjustSize()
{
var tbData = document.getElementById('tb').value;
document.getElementById('tb').style.width = 10 + tbData.length * 4 +'px';
}
</script>
<body>
<input type='text' id='tb' onkeydown='adjustSize()' style='width:10px' />
</body>
</html>
Something like this.. But you need to adjust the code according to your need.
|
|
|
|
|
how can i stop the page refresh of a master page. bcoz i want to add a flash animation to Master page and it should change when skip to a another page
|
|
|
|
|
you can't do that with a traditional master page. You need to use frames to create an area where a flash runs and is not refreshed. www.diawebster.com [^] has an example ( it's my website )
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
thanx to your reply,
but the problem is that flash object works as a menu. so it has links to other pages. therefore page is refreshed when a link is clicked.
can i stop it..
waiting for your reply
|
|
|
|
|
I have been tasked with replacing some DOM and javascript with an ASP custom control.
The aspx page is using master pages.
What I need to do is access the custom control with javascript in the aspx page. The control and its C# code behind are working, but I need to access a listbox contained within the control. I seem to be unable to access the control at all.
For example, in the aspx page I have the custom control like this:
<uc1:_Locations ID="_Locations1" runat="server" />;
In another page using an AJAX slider control, I have been able to access it like this:
var sliderUpdater = $find("SliderBehavior");
... then I am able to get and set properties for the slider.
However, trying similar approaches with our custom control all results in returning null from the $find. Note: our control does not currently have any extenders or BehaviorID.
I will post more code details if necessary.
Any ideas, help, or links would be appreciated.
Thank you.
|
|
|
|
|
Rico MNC wrote: returning null from the $find
What ID are you using in the find? Don't forget about the name mangling that ASP.NET applies to IDs
only two letters away from being an asset
|
|
|
|
|
Yes I am aware of the name mangling, and have tried all my usual solutions. I will post more details and examples later.
Thanks for trying to help.
|
|
|
|
|
When I try this:
var foo = $find<"%=_Locations1.ClientID%>");
The dynamic page during debug shows:
var foo = $find"ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain__Locations1");
and foo is null after stepping through it.
|
|
|
|
|
Everytime I try to load a datagrid I get that a dbnull can't be convert to a string. I have included the following on the field that I am trying to convert to a link (with document location and name included).
<%#iif (IsDBNull(Container.DataItem("LinkName"))= True, "", ViewDocument(Container.DataItem("LinkName")))%>
It always goes to my sub routine ViewDoment() even when the Link Name is null. This works well on a field I'm making visible depending on if this same field is null or not but it won't work for the sub routine. Can anyone explain to me why or tell me what is wrong with the code?
Thanks,
Carolyn
If you can’t have fun at work, then why go to work?
|
|
|
|
|
This would work if you used a decent language....
iif evaluates both sides of the equation if I remember correctly. You should write a method that is passed the data item, and inside that, work out if it's DBNull using an if statement, not iif
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: You should write a method that is passed the data item, and inside that, work out if it's DBNull using an if statement, not iif
Anybody who uses iif, even if they know that both results can be evaluated is asking for trouble, IMHO. I never used it in classic VB because it was a library function that always produced a function call instead of inline code. I guess its still available for compatibility, but it leads people to think that they can write the kind of code in the OP.
|
|
|
|
|
Hi,
I am using asp.net built in membership mechanism for registration and login in.
I recently transferred a website to a different hosting including the sql server database. After transferring the website all the previous user who registered now can't login with their user name and password. Password recovery says that the user name doesn't exist.
However, new account registration works and there is no problem logging in with the new account.
Does anyone know what the problem is?
Thank you for the time.
|
|
|
|
|
Sounds obvious. Your SQL migration did not work, the data for old users was lost.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
The username is in the database. That's the thing. I checked it.
When I try to register same user it throws a duplicate record error for the username. That's a confirmation that it's in the db.
|
|
|
|
|
This was resolved. Thanks.
|
|
|
|
|
Well don't just leave us hanging man; How was it solved? Others may find it useful to know also.
only two letters away from being an asset
|
|
|
|
|
The initial response was correct the asp membership data was not transferred. It was another table that showed the error.
|
|
|
|
|
Actually the data was in the tables. The application name in web.config should match the applicaion name in the asp_applications table.
|
|
|
|
|
|
Hi
I am trying to understand ASP.net extenders. Here is the link I am following. Look at Listing 3 - DisabledButton.js
http://www.asp.net/learn/Ajax-Control-Toolkit/tutorial-49-cs.aspx
Most of the parts I am able to follow but the style of Javascript used here blew me away. I wrote Javascript in past but this is so different than what I wrote before. Probably, this is recommended style now.
Where can I find more to write Javascript like this? Please advise.
thanks
PM
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
To deal with this code ...
&;lt;table&;gt;
<asp:Repeater ID="Repeater1" OnItemDataBound="test_ItemDataBound" >
<ItemTemplate>
<tr>
:(
<td >
<asp:CheckBoxList runat="server" ID="chboxlst">
</asp:CheckBoxList>
</td>
<td valign="top" width="100" ">
<radCln:RadDateTimePicker ID="date" runat="server">
</radCln:RadDateTimePicker>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
.. i added following code in code behind -
protected void test_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
{
CheckBoxList lst = e.Item.FindControl("chboxlst") as CheckBoxList;
lst.DataSource = wtever;
lst.DataBind();
}
but originally chboxlst is used in various methods in the code behind and according to above code, i can not access lst outside the above mentioned ItemDatabBound event.
Any ideas ?? - how can i access lst globally to be able to replace it with chboxlst ID.
Or if there is any other way to get this working.
|
|
|
|
|
AndyInUK wrote: Any ideas ?? - how can i access lst globally to be able to replace it with chboxlst ID.
If it's databound like this, you don't HAVE one checkboxlist. You have one for each item. Where do you want to access it ? If in a check changed event, that should be passed the control in question. If in page prerender, you could generate a list of checkboxlists as each is data bound.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Sorry but i didn't got you.
Ok i will try to explain the problem. There was a checkboxlist already present and chkbxlst(ID of that checkboxlist) is called in various places in code behind. Now if i cut copy the same checkboxlist control and add it under repeater control then i can not access chkboxlst id from code behind.
So what should i do so that i can call find and call chkbxlst id in code behind in all the places.
I hope it's bit clear now.
|
|
|
|
|
AndyInUK wrote: I hope it's bit clear now.
Very clear. It is obvious you need to read up on how to use repeater controls.
|
|
|
|