|
DEAR Britney S. Morales
thanx,
for providing me solution of my problem.
Njoy
bye
again THANX.
rahul saini
|
|
|
|
|
Please check my new post,
thanx
rahul saini
|
|
|
|
|
hi,
i have one site which is in ASP. now in that site i have a link which will redirect to another ASP.Net site.
Now i want to open that ASP.Net site within a ASP site so how can solve this problem ?
I have put Iframe in ASP site but in that I have to specify height. But my ASP.Net page's size is not fixed it will vary as per my data as i have put dataGrid in ASP.Net site.
Please solve this..
|
|
|
|
|
Hi guys
i am developing one website and it is having mane forms. and all those forms have many textboxes. so after inserting data from textbox i want to make all text box clear. for that i dont want to write each and every textbox.text="" so if any one knows other solution please help
(
Regards,
DJ Rock
|
|
|
|
|
I'm not sure, but I think you should play around with viewstate. You can set EnableViewState property of your textboxes to false, or you can set this property to be false for whole page, if you don't need viewstate at all. Or you can override LoadViewState or SaveViewState methods of your Page class. Or you can simply go through all controls and if a control is type of TextBox set its text to ""
<br />
foreach(System.Web.UI.Control control in Page.Controls)<br />
{<br />
SetTextBoxesText(control);<br />
}<br />
<br />
public void SetTextBoxesText(System.Web.UI.Control control)<br />
{<br />
if (control.GetType() == "System.Web.UI.WebControls.TextBox")<br />
{<br />
((System.Web.UI.WebControls.TextBox)control).Text = "";<br />
}<br />
foreach (System.Web.UI.Control childControl in control.Controls)<br />
{<br />
SetTextBoxesText(childControl);<br />
}<br />
}
Pilo
|
|
|
|
|
|
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?
|
|
|
|