|
My appliction is Online Test and i am getting an issue in the same. I have summarized the issue below. If you have any solution or if you know what causes that then Please let me know.
Issue:
=====
When a candidate starts test I am creating an xml file in page say starttest.aspx in the server its size may vary (maximum size is 60kb). After that I am opening a pop up window say test.aspx and reading the data from xml file displaying the questions and answers. When I read the xml file I am getting the following error “System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.IO.FileNotFoundException: Could not find file "C:\sahitya.kothuri_7000.xml". File name: "C:\sahitya.kothuri_7000.xml" at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) at System.IO.StreamReader..ctor(String path) at SkillExaminer.Candidate.CandidateTestXml.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\skillexaminer\candidate\candidatetestxml.aspx.cs:line 120”
I am not getting the error when two people take up test. But when 40 people take test one or two are getting this for rest of them it works fine.
Can you guess what could have caused this problem?
Ramya
|
|
|
|
|
This is because the system is not able to find the file. and the reason could be youare trying to access the file before it is created. Thus the application works when your file is present and otherwise throws an exception.
Fastest way (not the best) to slove ths is Handle the exception, you can do that by putting code (where you try to open the file) in a try catch block, and ask te usr to retry.
I hope that helps.
Regards,
|
|
|
|
|
hi,
i want to customize the SUBJECT of MailMessage object.
is there any way like MailMessage.BodyFormat?
is there any other way to resolve this problem?
Thanks
Krishna
krishna n
|
|
|
|
|
Hi all,
I wish to create a Custom Repeater Control and for that Control, i wish to create Templates during Design time. (ie) The Web page designer can put the controls (drag & drop) in the Corresponding Templates.
For that i am using 'ControlDesigner' class to create the necessary Templates for that Custom Repeater Control.
Can anybody pls give me a Nice Article which clearly explains the core concept of this? Thanks.
Regards,
Jay
|
|
|
|
|
Hi there,
I have a web application and an aspx web form,
I have to access to a web service made on non-.net platform like resin and I got this exception:
Possible SOAP version mismatch: Envelope namespace http://schemas.xmlsoap.org/wsdl/ was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/.
I'm working with VS2003.
I also tried with VS2005 but the error persists.
What can I do?
Thanks a lot
Francesco Sangiuseppe
|
|
|
|
|
I was wrong beacause I call the web service with "?wsdl" at the end of the url.
but now I get the exception with "Fault" message.
|
|
|
|
|
Hi all,
I am getting Request timed out error,
actually in my local server i am not getting these error, but when the client uploaded application he is getting these error
I given commondtimeout property in that location like commondtimeout = 600
and also given timeout property in forms authentication like timeout = 60
client cannot given thesituation when he is getting that....
plz help me
thanking you
Balu
|
|
|
|
|
IMO, you may ask your client for more information to diagnose the problem, for example he got that error when he navigates to a specific web page or any page of the application, the information of the environment where the client runs the application may also give you some hints.
|
|
|
|
|
Hi,
When we ask the client for that, he said that problem rising in only one page that when he upload or delete some images,
But that page in my local server i didnot get any error
Thanking you
bye......
balu
|
|
|
|
|
hi, im working on an aspx page where i should make a datagrid and that when i click on its button column member the data in the selected row should entered in 2 textboxes in the same page without postback (using ajax), so i did every thing but the page still refreshed (postback) so i have 2 questions:
1) what is the 'url' that should be send to 'callbackmethod()' i send the url of the same page im on?
2) should i not use the datagrid since it has no 'autopostback' property, but even when i use a listbox and set its 'autopostback' property to false none of its events had fired (trigerred)?
regard,
Ghassan
Ghassan
|
|
|
|
|
Which AJAX library are you using? Or you just use your own script? Perhaps, the reason causing the page post back is the button, you can view source the web page and have a look at the html markup of the button that may give you some hints as to why the button submits the page, it uses its submit action or script to do that.
|
|
|
|
|
Hello
I am developing application which creates text-box and check box at run time in asp.net using c#.I am adding checkbox n textbox to panel.
as
Checkbox chk=new Checkbox();
this.mypanel.controls.add(chk);
and text box as
Textbox txt=new Textbox();
this.mypanel.controls.add(txt);
by this check box get added successfully.
but when i am going to get the value of that check box n text box it by Find control then it give me error as "undefined".
So I want to access textboxes n checkboxes which r created runtime.
Swapnil Bhavsar
|
|
|
|
|
What does your sample code look like? The link below may give you some hints:
Accessing ASP.NET Controls Programmatically [^]
Also, make sure that you should readd the dynamic controls before the postback data is processed, otherwise they get lost, to learn more about this you can see the control life cycle in MSDN.
|
|
|
|
|
how to download file from server to client in asp.net web application
and i have to create new file in client machine folder from server code
|
|
|
|
|
|
hi everybody...
How can i embed external device into my application, is there any tutorial to read any steps to accomplish
external device like --> serviilenace cameras
thanks in advance
Hai this is fresh programer
|
|
|
|
|
IMHO, there are a couple of options that you can embed an external device in your web pages:
+ Your web page can host the device as an ActiveX control.
+ You can develop a window user control to host the device, then you can embed the control into your web pages, however the downside of this option is that the client side needs to have the .net framework in order for the windows control to work.
|
|
|
|
|
I have a problem. If I have a submenu item in a menu tree and it is not in the FIRST parent menu then it does not work BUT if I add this to the first menu it works in the first as well as any other menuitem I add this submenu too? ANY ideas?
I have a sub running to pickup a onmouseclick on the menuitems.
Sub onclick()
Does something
Menuitem1
Submenu item1
Submenu item2
Submenu item3
Menuitem2
Submenu item4
Submenu item5
Submenu item 1,2,3 works fine and on a mouse click on them the sub runs, but 4,5 does not do anyhting. IF I now do the following.
Menuitem1
Submenu item1
Submenu item2
Submenu item3
Submenu item4
Menuitem2
Submenu item4
Submenu item5
THEN Submenu item 4 works fine in both the Menuitem1 as well as Menuitem2 parents. Both works. I do not WANT Submenu item4 under Menuitem1 but if I do not have it there it does not work.
ANY ideas?
Here is the almost full page code. I had to ADD all the submenues to my first parent manu jsut to get it to work, but if I take them out none of the other parent manues submenues work at all.
----------------------------------------------------------------------------------------------
<%@ Page Language="VB" %>
<script language=vbscript runat="server">
Sub NavigationMenu_MenuItemClick(ByVal sender As Object, ByVal e As MenuEventArgs)
Dim MessageTransfer = e.Item.Value
'MsgBox(e.Item.Value)
'message.text = MessageTransfer
Response.Write("<input type='hidden' id='TestString' value=" & MessageTransfer & ">")
End Sub
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
</head>
<body bgcolor=white>
<!-- Place the Iframe with the top logo/banner and images here. -->
<iframe id="banner" src="images/headers/about.jpg" name="banner" frameborder="no" height="220px" width=100% scrolling=no></iframe>
<table width=100% cellpadding=0 cellspacing=0>
<tr width=100% align=left valign=top>
<td width=150>
<table cellpadding=0 cellspacing=0>
<tr>
<td>
<form id="form1" runat="server">
<div>
<asp:Menu ID="Menu1" runat="server" BackColor="#def7ff" DynamicHorizontalOffset="0" StaticPopOutImageUrl="~/popoutimage.gif"
Font-Size=Small Font-Names="Verdana" Font-Bold=true ForeColor="#2a70d6" StaticSubMenuIndent="0px" onmenuitemclick="NavigationMenu_MenuItemClick">
<Items>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Home" Value="home.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="About Us" Value="">
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="History" Value="about/history.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Constitution" Value="about/constitution.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Executive" Value="about/executive.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Fellow and Honorary Members" Value="about/h_members.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Annual Report" Value="about/annual_report.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="AGM" Value="about/agm.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Why use an IO Psychologist" Value="about_profession/why.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Other professional Bodies" Value="about_profession/professional_bodies.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Statutory Requirements" Value="about_profession/statutory_requirements.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Online Registration" Value="conference/online_registration.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Call for papers" Value="conference/callforpapers.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Urgent" Value="news/urgent.asp" />
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Latest News" Value="news/latest.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Press Releases" Value="news/press.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Archives" Value="news/archives.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Why Join" Value="membership/whyjoin.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Membership Fees" Value="membership/fees.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Application Forms" Value="membership/application.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Gauteng" Value="regions/gauteng.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Western Cape" Value="regions/westerncape.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Kwa-Zulu Natal" Value="regions/kzn.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Advisory Committee" Value="committees/advisory.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Ethics" Value="committees/ethics.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Tariffs" Value="committees/tariffs.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Practice Framework" Value="committees/advisory.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Re-Classification of test" Value="committees/advisory.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Committee volunteer form" Value="committees/volunteer.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Continuing professional development CPD" Value="education_cpd/cpd.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Internship" Value="education_cpd/internships.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="National Board Exams" Value="education_cpd/exams.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Bursary" Value="research/bursaries.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Research Grants" Value="research/grants.asp"/>
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="About the Profession" Value="">
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Why use an IO Psychologist" Value="about_profession/why.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Other professional Bodies" Value="about_profession/professional_bodies.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Statutory Requirements" Value="about_profession/statutory_requirements.asp"/>
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="News" Value="">
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Urgent" Value="news/urgent.asp" />
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Latest News" Value="news/latest.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Press Releases" Value="news/press.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Archives" Value="news/archives.asp"/>
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Membership" Value="">
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Why Join" Value="membership/whyjoin.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Membership Fees" Value="membership/fees.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Application Forms" Value="membership/application.asp"/>
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Regions" Value="">
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Gauteng" Value="regions/gauteng.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Western Cape" Value="regions/westerncape.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Kwa-Zulu Natal" Value="regions/kzn.asp"/>
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Interest Groups" Value="interest_groups/assessment_centres.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Committees" Value="">
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Advisory Committee" Value="committees/advisory.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Ethics" Value="committees/ethics.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Tariffs" Value="committees/tariffs.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Practice Framework" Value="committees/advisory.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Re-Classification of test" Value="committees/advisory.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Committee volunteer form" Value="committees/volunteer.asp"/>
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Education/ CPD" Value="">
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Continuing professional development CPD" Value="education_cpd/cpd.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Internship" Value="education_cpd/internships.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="National Board Exams" Value="education_cpd/exams.asp"/>
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Research" Value="">
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Bursary" Value="research/bursaries.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Research Grants" Value="research/grants.asp"/>
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Journals" Value="journals/index.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Events" Value="">
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Online Registration" Value="conference/online_registration.asp"/>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Call for papers" Value="conference/callforpapers.asp"/>
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/frontbuttons.gif" Text="Contact Us" Value="contact/index.asp" />
</Items>
<StaticSelectedStyle BackColor="#2a70d6" />
<StaticMenuItemStyle HorizontalPadding="0px" VerticalPadding="0px" />
<DynamicMenuStyle BackColor="#def7ff" />
<DynamicSelectedStyle BackColor="#def7ff" />
<DynamicMenuItemStyle HorizontalPadding="0px" VerticalPadding="0px" />
<DynamicHoverStyle BackColor="#31ade9" Font-Bold="True" ForeColor="#ffffff" />
<StaticHoverStyle BackColor="#31ade9" Font-Bold="True" ForeColor="#ffffff" />
</asp:Menu>
</div>
</form>
</td>
</tr>
<tr>
<td>
<!-- Place the current IFRAME for the loggin and security menu here -->
<iframe id=LoginMenu frameborder=no src="" width="150px" height="300px" scrolling=no></iframe>
</td>
</tr>
</table>
</td>
<!-- the main frame where the different pages needs to be displayed -->
<td align=centre bgcolor="#31ade9">
<iframe id=MainIframe src="home.asp" height=550px width=100% marginwidth=0 frameborder=0 scrolling=auto></iframe>
</td>
</tr>
</table>
<%--<asp:Label ID=message runat=server></asp:Label>--%>
</body>
<script language="javascript">
//alert(TestString.value);
if(TestString.value != ""){
//alert(TestString.value);
MainIframe.location.replace(TestString.value);
}
</script>
<script language="vbscript">
'Place the session code here to determin what menu for logged in users to display.
Sub window_onload()
Dim PersonID
Dim Member
Dim AdminMenu
PersonID = "<%=Session("person_id")%>"
Member = "<%=Session("Member")%>"
AdminMenu = "<%=Session("AdminUser")%>"
if AdminMenu = "yes" then
top.document.all.LoginMenu.contentWindow.location = "AdminMenuFrame.asp"
elseif Member = "yes" then
top.document.all.MenuFLoginMenurame.contentWindow.location = "MemberMenuFrame.asp"
else
if Member = "no" then
top.document.all.LoginMenu.contentWindow.location = "GuestMenuFrame.asp"
else
top.document.all.LoginMenu.contentWindow.location = "Login.aspx"
end if
end if
End Sub
</script>
</html>
this is me
|
|
|
|
|
How do you attach the onclick client function to the treenode? Are you sure that the method is attached to the nodes that are not working as you said?
|
|
|
|
|
I found the problem.
My parents that does have children has all got values of "" and this does not work. Each parent and child need to have a unique value it seems. I set each parent with a unique value from 1 - 10 and simple check to see if the value from the selected menuitem is NOT a numeric value between 1 - 10 and if not then do the iframe src change.
I did not know that the parents values should be unique and should have values.
Thanks in any case. I am just glad it is working now. Must say took me ages to figure this out as I could find no help in telling me that this should be.
this is me
|
|
|
|
|
Can any one help me to display a calender using textbox and buttonclick,i need to use a pop-up calender in my form.ihave no idea how to do ths????I need exactly like,when we have a calender from webcontrols and when we try change properties there we find selected date.so when we click on perticular date it displays like that,
I need the same format in my application like that,Please try to give answer.
|
|
|
|
|
I think you can use client side scripting to popup a calender. I am new to ASP.NET but otherwise i would have used Javascript to do so.
Regards,
|
|
|
|
|
I would like to perform mouse click(right / single / double ) in a every node of an treeview control. But no such event is avail for this control. How can i perform this operation ?.
Jey
|
|
|
|
|
Hi there,
In this case, you can customise the TreeView control to do what you want. You can create a custom TreeNode as below and override the RenderPreText/RenderPostText method:
public class ExTreeNode : TreeNode
{
protected override void RenderPreText(HtmlTextWriter writer)
{
base.RenderPreText(writer);
writer.AddAttribute("onmouseover", "alert('hover me')");
}
} Also, to make the TreeView control work properly on postback, you may need to create a custom TreeView control by inheriting the built-in control and override the protected CreateNode method.
|
|
|
|
|
I currently using textbox with property multiple line, and i have write some text I want to break it into new line can insert into database.
Please help me?
................
|
|
|
|