|
Hello All,
I am in the way of developing a web-chat application. In my ASP.Net application i am using AJAX.
In my application first the user will login and can navigate through the page. If he like to chat then he need to click on a link, then a small ASPX Page will be opened. This will be opened via JAVA Script function named "window.open()". In this chat window i used AJAX and this will refresh for every 5 seconds. Normally the focus in the chat window will be on the text area in which the text will be entered. Even i followed the same trend. Just think the Textbox id is "TB_ToSend". In this chatwindow i have given "defaultfocus" as "TB_ToSend" and for every AJAX refresh in the OnTimer Function i have given
"ScriptManager1.SetFocus(TB_ToSend);"
where ScriptManager1 is the ScriptManager id.
But i face a problem here in IE 7 when i click on the Parent window when the chat window is open(commonly we do it when we like to switch between windows) ,then after 5 seconds the chat window will popup and i lose focus on the parent Window(due to the focus i set in AJAX timer). This is not the expected behaviour, the expectation is that the focus need to be on the Parent window. This Issue doesnot occur in FireFox. Can anyone give me sugession to overcome this or is there any other way to set the focus.
|
|
|
|
|
Right now , i buy a host and a domain. and i want to publish my project on real website : WWW.MYDOMAIN.COM . but i encounter a problem :
when i want to login to website it send me an error with this title : "Server Error in '/' Application." and contain this message :
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
I dont undersetand what should i do !
Any Idea?
[]D @ []v[] []D @ []v[]
|
|
|
|
|
Create a file called Web.config in the root directory of your site.
Put this in the file:
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Then it will tell you where the error is...
Warning, that will show intimate data about your site, before you go live you need to either remove that Web.config file, or better yet, set a better one up, go read about Web.config files, they are quite useful.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
i do it! but it didnt help me! any other another one Idea which can help me?
[]D @ []v[] []D @ []v[]
|
|
|
|
|
Hi all,
I am using a css class for applying horizontal line for each row in a grid view . Its work but it is applying for header line also. Is there a posiblity to remove the class property (css) for the header line.Can any one help me to code the JS.
|
|
|
|
|
Why do you need JS...
Use HeaderStyle to set the style of the header of GridView.
this is the most simple fix.
|
|
|
|
|
Hello,
Using VS 2005 and ASP.NET
One Update panel with following controls:
sqldatasource.
next and previous button to naviagate.
51 textboxes to show the data from orace table.
This is select command of sqldatasource
SELECT * FROM "SECM98" WHERE (("ROL" >= :ROL) AND ("ROL" <= :ROL2)) ORDER BY ROL
Public Sub showdata(ByVal r As Integer)
SqlDataSource1.EnableCaching = True
dv = CType(SqlDataSource1.Select(DataSourceSelectArguments.Empty), System.Data.DataView)
TextBox1.Text = IIf(IsDBNull(dv.Table.Rows(r - 1)("rol")), "", dv.Table.Rows(r - 1)("rol"))
TextBox2.Text = IIf(IsDBNull(dv.Table.Rows(r - 1)("cen")), "", dv.Table.Rows(r - 1)("cen"))
TextBox3.Text = IIf(IsDBNull(dv.Table.Rows(r - 1)("dst")), "", dv.Table.Rows(r - 1)("dst"))
..
..
End Sub
It is taking lot of time to run dv = Ctype(SqlDataSource1....)
Or
How do i get the resultset returned by sqldatasource, so that i can show the data in the textboxes.
Please guide and help me.
Regards
Girish Sharma
|
|
|
|
|
I think the problem might be in the database.
check how much time is required to fetch actual data from the database.
If it is taking long then use of Index might cure the problem somehow.
|
|
|
|
|
Thanks for your reply and interest in the thread. I am using oracle 10G database with proper index on rol column. I cheked that oracle is returning the rows in only 1 second in sqlplus. It is returning the rows fast in the oracle; but taking lot of time to run dv=..... line.
Please tell me what should i do to resolve the problem.
Regards
Girish Sharma
|
|
|
|
|
when i create a membership using the administration tool the data is stored i a .mdf file in appdata folder of the application, but in vedio tuitorial i saw that data stored in sql server 2005, in my local machine i 've sql 2005 server installed and iis 5.1 installed.i want to know how to configure asp to use the sql 2005 instead of local .mdf file?
|
|
|
|
|
Have a look here
Cheers!!
Brij
|
|
|
|
|
Having a problem with the Auto resizable text area inside my asp:content, it works fine on its own without the ContentPlaceHolder, basically I have a site.master that handles the content but its giving me problems trying to work with javascript and AJAX. Any ideas anyone...
|
|
|
|
|
If you mix various technologies that you don't understand, you're bound to come unstuck ? You need to define things like 'giving me problems', and tell us what you've done to try to work out what's going on
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.
|
|
|
|
|
Maybe if you take a look at the code below:
Here below the textbox does not work at all for me:
<asp:content id="Content3" contentplaceholderid="mainContent" runat="Server">
function FitToContent(id, maxHeight, minHeight) {
var text = id && id.style ? id : document.getElementById(id);
if (!text) return;
var adjustedHeight = text.clientHeight;
if (!maxHeight || maxHeight > adjustedHeight) {
adjustedHeight = Math.max(text.scrollHeight, adjustedHeight);
if (maxHeight)
adjustedHeight = Math.min(maxHeight, adjustedHeight);
if (adjustedHeight > text.clientHeight)
text.style.height = adjustedHeight + "px";
}
}
<asp:textbox id="TextBox1" runat="server" onkeyup="FitToContent('TextBox1','','100')"
="" height="100" width="400" textmode="MultiLine" style="overflow: hidden">
Here below the textbox works fine:
<title>
function FitToContent(id, maxHeight, minHeight) {
var text = id && id.style ? id : document.getElementById(id);
if (!text) return;
var adjustedHeight = text.clientHeight;
if (!maxHeight || maxHeight > adjustedHeight) {
adjustedHeight = Math.max(text.scrollHeight, adjustedHeight);
if (maxHeight)
adjustedHeight = Math.min(maxHeight, adjustedHeight);
if (adjustedHeight > text.clientHeight)
text.style.height = adjustedHeight + "px";
}
if (!minHeight || minHeight < adjustedHeight) {
adjustedHeight = Math.max(text.clientHeight, text.scrollHeight);
if (minHeight)
adjustedHeight = Math.max(minHeight, text.scrollHeight);
if (adjustedHeight < text.clientHeight)
text.style.height = adjustedHeight + "px";
}
}
<asp:textbox id="TextBox1" runat="server" onkeyup="FitToContent('TextBox1','','100')"
="" height="100" width="400" textmode="MultiLine" style="overflow: hidden">
Now does this code explains enough of what I have done...Basically I don't know how to make it work with the Page.Master that defines the Content(That is my ContentPlaceHolder) which defines the look and feel of my website throughout all the web forms (Content gives them a constant look)....
|
|
|
|
|
I am trying to set image visibility based on some user information. Howver I always receive the following error message
Compiler Error Message: CS1061: 'XXX.SearchAcme' does not contain a definition for 'acmeBlemont' and no extension method 'acmeBlemont' accepting a first argument of type 'XXX.SearchAcme' could be found (are you missing a using directive or an assembly reference?)
This is my markup and code behind so far...any ideas what the problem could be? I can't seem to figure out what the problem is. Using FindControl did not work either and while debugging the page only seems to have 1 control in the ControlCollection. However, when you hover over "this" on a breakpoint, you can drill down and see the images.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Search.aspx.cs" src="Search.aspx.cs" Inherits="XXX.SearchAcme"
MasterPageFile="~/Center/Lobby.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="SponsorContent" runat="server">
<img id="acmeBlemont" runat="server" src="/acme/common/custom_images/weblet4_belmont.gif" width="170" height="45" border="0" visible="false" />
<asp:Image id="acmeVerde" name="acmeVerde" runat="server" ImageUrl="/acme/common/custom_images/weblet4_verde.gif" width="170" height="45" border="0" visible="false" />
</asp:Content>
namespace XXX
{
public partial class SearchAcme : AdvisorPage
{
public SearchAcme()
: base(ProgressNavIds.ChooseSearchOption)
{
}
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
this.acmeBlemont.Visible = true;
}
}
}
|
|
|
|
|
I've tried this and managed to reproduce your error. Suprisingly, removing the following attribute from your page declaration seems to resolve it.
src="Search.aspx.cs"
|
|
|
|
|
God I hate that attribute! Good to know, but I don't think I can remove it so I have to rely on a recursive find control method, which may be a little less efficient but does the job.
|
|
|
|
|
I have a treeview control in my page. Both the treeviews are inside of an update panel. Issue is, when the user clicks on back button of the browser and then clicks on the root node of the tree view, I am getting an error message saying that 'There was an error in the callback."
Is there any way which I can resolve this issue? Please help. Following is my html code for the update panel:
<p><
asp:UpdatePanel ID="TreeViewUpdate" runat="server" ChildrenAsTriggers="true"><ContentTemplate> <asp:TreeView onclick="postbackOnCheck(event,'ctl00_PCMSMainContent_CreateUserWizard_TreeViewUpdate')" ID = "AvailableBusinessUnitsTreeView" runat="server" Height="100%" Width="50%" ShowLines="true" ShowCheckBoxes="All" ExpandDepth="1" OnTreeNodePopulate="AvailableBusinessUnitsTreeView_TreeNodePopulate" OnTreeNodeCheckChanged="AvailableBusinessUnitsTreeView_TreeNodeCheckChanged">
<ParentNodeStyle Font-Bold="False" /> <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" /> <SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" HorizontalPadding="0px" VerticalPadding="0px" /> <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="2px" NodeSpacing="0px" VerticalPadding="2px" /> </asp:TreeView> </ContentTemplate> </asp:UpdatePanel>
</p>
window.onload = function()
{
}
function postbackOnCheck(e, updatePanel) {var event = window.event || e;var o = event.srcElement ? event.srcElement : event.target;if (o.tagName == 'INPUT' && o.type == 'checkbox' &&null && o.name.indexOf('CheckBox') - 1) {"");
Error occurs on this update panel. Can anybody provide any solution for this?
Thanks
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Hello,
I need help on finding the datagrid item whose radio button is clicked. I need to submit a page on which there are several datagrids with radiobuttons in it. So when a submit button is clicked I need to search and find all datagrid items whose radio buttons are clicked.
Please help.
|
|
|
|
|
Loop in all items and get all items which are checked.
e.g.
for (int row=0;row<=datagridview.Rows.Count-1;row++)<br />
{<br />
if(CheckBox1.Checked==true )<br />
{<br />
}<br />
}
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
Hello, this is Vikash Gohil.
I wanted to know how the LoginView Control Works and from where it Authenticates the Users.
Actually I have the Authentication Process in my Web Application from a Database Table.
How Can i do this using a LoginView Control.
Any suggestions please.
Thanks in Advance.
|
|
|
|
|
For authentication purposes,you can use ASP.NET membership provider.Its very easy n simple
For details Look Here
ASP.Net provides a list of controls you can use without writing much code.All will be done for you by ASP.NET 2.0.For contrls
Have a look
For details about Loginview control Click here
Cheers!!
Brij
|
|
|
|
|
I found one interesting problem when I read an image file whose name containing #,it fails always to be displayed in a gridvew imagefield, but once
I delete this # in the file name, then no more problem.
I do not what is the reason, any solution for this execept I delet # or change it with others such as sharp by hand? it is better not to change it for my case.
thank you!
|
|
|
|
|
Why your file's name must have sharp (#) character as part name of file?
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
I have one image field in my gridview, due to the limit of size, all the images are displayed with a smaller size, but I want to realize the following function: when the user move the mouse on the image, the image can be enlarged either in the same position (maybe more difficult, moreover, the size should be recoverd once the mouse left this field) or in a jumped new window (may be easier).
what I do not want to redicrect to a new window to display the biger image.
anyone can suggest a solution? thanks!
|
|
|
|