|
|
hello everybody,this is my first time to here,I am a Chinese and my English is poor,so I will try my best to make myself clearly.When I run my code on server I received an er ror like this "System.IO.IOException: The device is not ready." but it work correctly on my local machine.It's very strange,I don't know how to resolve it,I need your help,please give me a favor,thank you.
This is the error description.I just use ajax to get data from database .
[ErrorInfo]:System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.IO.IOException: The device is not ready.
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)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReader.CreateScanner()
at System.Xml.XmlTextReader.Init()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlValidatingReader.ReadWithCollectTextToken()
at System.Xml.XmlValidatingReader.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at IVan.Public.Function.RealFromXMl(String id)
at ChinaOnline.Events.Events_posting.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-- modified at 20:19 Thursday 16th November, 2006
learning more everyday
|
|
|
|
|
Paste a code here, where this exception is thrown. Otherwise nobody will be able to help you
Pilo
|
|
|
|
|
Dear All
i made a webform that contains a listbox, and a pop up window.
the pop up window contains two text boxes, what i want is to know how can i pass the values of the text boxes to the parent form to ass them to the listbox?
i want the first textbox to be the listitem's text and the second textbox to be the value of that listitem
i know i should use java script (maybe window.opener ...) but i need some clues to do the implementation
Thanx everyone
Best Regards
3ala2
|
|
|
|
|
u can use the session variables hope tht'll help u.
assign value to session variable.
session["txt1"]=TextBox1.text;
retrive value from session variable
string sessiontxt=session["txt1"].tostring();
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
suppose i put the values in a session variable, would they be moved between forms?
i mean i'll assign the session value from the pop up window and i want to read it from the parent window.
another thing, how will i add the list item to the listbox of the parent page?
suppose i want to reload the form again, in this case it will only add the last list item only and the previous ones will be lost
hope there is another way
Best Regards
3ala2
|
|
|
|
|
This is my code, where I open modal dialog to create new category entry (in parent page):
public static string OpenCreateCategoryModalDialog(string url)<br />
{<br />
return @"<script type='text/javascript'>"<br />
+ "function CreateCategory(){"<br />
+ "ret = window.showModalDialog('" + url + "');"<br />
+ "document.getElementById('hdnCategoryReturn').value = ret;}"<br />
+ "</script>";<br />
}
you have to register it using
Page.RegisterClientScriptBlock("OpenMocalDialog", MyJavascript.OpenCreateCategoryModalDialog(modalDialogUrl));<br />
and call it when user clicks on button.
then in child modal dialog, you have to add to your submit button attribute:
submitButton.Attributes.Add("OnClick", "javascript:window.returnValue = #myreturnValue#")
replace #myReturnValue# with javascript that gets values from your textboxes. you can separate these values by semicolon or something, so you can get them from hidden field and split them on parent page in event handler.
I hope you understand what I mean
Pilo
|
|
|
|
|
That is great although i needed to convert it to VB
but where should i put the code to add the values of the text boxes from the pop up window to the parent form?
i mean where or how can i call the addToList() function for example?
Best Regards
3ala2
|
|
|
|
|
Well, I suppose you have a button, that opens modal dialog. this button has assigned javascript function on client side (it opens modal dialog, waits until this dialog returns a value and then stores it into hidden field) and it has assigned event handler on server side (this is always called afetr client side javascript - it causes postback, so you can be sure, value is already stored in hidden field). You can read this value in your eventhandler for this button and add values into listbox there as well.
One more think, in modal dialog doesn't work postback, so don't use this solution, if this second page has to be more complicated with postback involved.
Pilo
|
|
|
|
|
man it's very confusing
i couldn't implement it
can u give me a running sample of it or website links as tutorial to do this?
i didn't register the script because it gave me some problems so i wrote it in the aspx page in script tag
the modal dialog opens fine but when i submit the submit button opens another pop up just like itself and with the fields filled in it!
Best Regards
3ala2
|
|
|
|
|
As I mentioned, you can not use postback in modal dialog. But I didn't mentioned, that because of that you can not use asp:button in modal dialog window, use <input type=button... > instead. this will not cause postback, only calls javascript assigned to this button.
Pilo
|
|
|
|
|
use a session variable
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
let say i have 2 aspx pages, A and B. Page A has many record and a submit button. When user select a record on page A and click submit button, page B will pop up and show the selected record's information. So, how to make it while user select a record on page A and click submit button, B will auto show the latest record's information ?
Best regards,
Chee ken
|
|
|
|
|
Hi
do u want to show page B as a popup window with selected records information?
Pathan
|
|
|
|
|
yes, actually i want page B as popup window to show the record information. So, Everytime the user select a new record and click the button on page A, if page B is still openning , then B will auto refresh and show the latest record information ;or if the page B is closed, then page B will pop up again and show the latest information.
Best regards,
Chee ken
|
|
|
|
|
Hi
try this script.
<script language="javascript"><br />
function PopUp(){ <br />
var strFeatures="toolbar=no,status=no,menubar=no,location=no"<br />
strFeatures=strFeatures+",scrollbars=yes,resizable=0,addressbar=0,height=500,width=500"<br />
newWin = window.open("B.aspx","TellObj",strFeatures);<br />
newWin.opener = top;<br />
}<br />
</script>
write this script in Parent page and call on submit button.
It will be refresh whenever submit button clicked
Pathan
|
|
|
|
|
hope tht'll help u
<br />
string cScript = "<script language='javascript'> opener.location.href = 'parent.aspx' </script>";<br />
Page.RegisterStartupScript("parentwindow", cScript);<br />
<br />
<br />
event call into: page load of child page.
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
|
Hi,
Can anybody tell me why the asp.net webservices doesn't support multidimensional arrays i.e. when i am trying to return an multidimensional array i am getting an error message "Cannot serialize object of type System.String[,]. Multidimensional arrays are not supported." But I am able to return jagged arrays.
Thanks
Phanindra...
|
|
|
|
|
Im having the same problem and there seems to be no help on this, did you come right?
|
|
|
|
|
hi,
i am new to .net environment.Currently i am developing a webform that consist of several textboxes. we are using a sql server 2000 database.
now i want to add data in the respective table using textboxes.
i.e when the user enter the data into the textboxes and click the "add" button at that time the data enter into the textboxes should enter into that particular table in sql server 2000 database in the backend.(and it should not be hardcoded)
please tell me how to do that that by giving me some example or some link through which i can get some idea.
thanks and regards.
pranav
Pranav Dave
|
|
|
|
|
Here[^] you can get that.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
I have a custom validaton control and javascript code which
is having a single function for checking out more than one validation.
Now what the scenario is I have to revert the messages back from the Javascript function to errormessage property of custom validator control based on the condition satisfied in the javascript function. I have not used much of JavaScript u can say a beginner.
If anybody has any solution or you require more inputs then please feel free to write me your valuable response.
Thanks
Regards,
Varun Arora
|
|
|
|
|
Here an example, I hope it will help you
function
ClientValidation (source,arguments)
{
var
ctl1=document.getElementById('ctl00_ContentPlaceHolder1_MyField1).value;
var ctl2=document.getElementById('ctl00_ContentPlaceHolder1_MyField2').value;
var
vld=document.getElementById('ctl00_ContentPlaceHolder1_MyValidation');
if
(ctl1=="" || ctl2=="")
{
vld.errormessage='MyNewMessage'; //important: errormessage must be in lower case
arguments.IsValid = false;
}
}
Eric H.
|
|
|
|
|
hello i have a datagird in one page and i want to bind this datagrid from another page, meanwhile i want to access this control in another page.
how can i do it,
any suggestion Plz
-- modified at 4:14 Thursday 16th November, 2006
Dotnet
|
|
|
|