|
I created n number of textboxes dynamically depends on user requirements.....now i want to save data of those dynamically created textboxes.....i m not getting the proper way whether to use FindControl or ViewState ?...........plz guide me
|
|
|
|
|
Hi,
You can use FindControl to get the value from dynamically created controls.
Best Regards
Jay
|
|
|
|
|
KhandelwalA wrote: ...now i want to save data of those dynamically created textboxes.....i m not getting the proper way whether to use FindControl or ViewState ?.
For Dynamically created TextBox, You need to keep in mind some point !
You have to create the Textbox Before Page Load . Create your text box in Page_PreInit() , otherwise, you will never get the ViewState and Postback Data. Because Postback data and View state data loads just before the Page_Load .
Hope this will help you !
|
|
|
|
|
Hello,
Hii everybody,
i want to know how to get live video stream from our web-cam in to our web-page
in asp.net ?
thanx in advance!
|
|
|
|
|
|
Hi guys! I am developing a page that gets a PFD file from a FTP directory and then reads it using the IO stream and then output it to the use in the same page.
I have built the page, but I am getting an error everytime I try it that says "there was an error reading this document".
Well, this is the code I am using:
Const username As String = "pdfuser"
Const password As String = "pdfpass"
Dim URI As String = "ftp://192.168.20.10/PDF/9006.pdf"
Dim ftpReq As FtpWebRequest = DirectCast(System.Net.WebRequest.Create(URI), FtpWebRequest)
ftpReq.Credentials = New NetworkCredential(username, password)
ftpReq.UsePassive = False
ftpReq.UseBinary = True
ftpReq.Method = WebRequestMethods.Ftp.DownloadFile
Dim ftpRes As FtpWebResponse = DirectCast(ftpReq.GetResponse, FtpWebResponse)
Dim responseStream As IO.Stream = ftpRes.GetResponseStream
'loop to read & write to file
Response.ContentType = "Application/pdf"
Dim FileSize As Long
FileSize = 1024
Dim Buffer(CInt(FileSize)) As Byte
Dim count As Integer = 0
Do
count = responseStream.Read(Buffer, 0, Buffer.Length)
Response.BinaryWrite(Buffer)
Response.Flush()
Loop Until count = 0 'see Note(1)
Response.End()
Please help..
Abdulsalam Alasaadi
Multimedia & Web Spacialist
http://www.zeroonebahrain.com
|
|
|
|
|
I want to display a pdf document on an Iframe and what gets displayed on my frame is :
"Server Error in '/LearningConceptsA' Application.
--------------------------------------------------------------------------------
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /LearningConceptsA/Images/Variable[1].pdf
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082 "
Have I placed it in the right folder? may be not. someone suggested I place it in the App_Code folder, which I can't see.
Well the code behind the dropdownlist looks like:
"protected void ddlBasicConcept_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlBasicConcept.SelectedValue.Equals("Variable"))
{
frmWord.Attributes.Add("src", "Images/Variable[1].pdf");"
Please help a junior programmer in need.
ML Lingwati
|
|
|
|
|
LucBite wrote: The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /LearningConceptsA/Images/Variable[1].pdf
Error clearly says the file location is not valid !
|
|
|
|
|
Any suggestion where to place my pdf file and how to access it?
ML Lingwati
|
|
|
|
|
Hi,
I need to access the property of UserControl inside the App_Code (Common Function or modules) in ASP.NET(VB).
Did any one have any idea about this?
Best Regards
Jay
|
|
|
|
|
Hi all,
I am registering one student so its corrosponding id is getting generated. i want to display this id in message box and redirect to another page , but i am not able to display alert box or message box because before displaying message i am redirecting to another page. how to solve this problem.
Thanks,
Amit Patel
|
|
|
|
|
Are you using alert and location.window.href in the same javascript function? If yes it should work, because as far as I know is alert blocking... Could you post a bit of the code, for a better understanding?
Regards
Sebastian
|
|
|
|
|
Hi,
<
string script = "<script language='javascript'>";
script += "alert('" + patientId + "');\n";
script += "</script>";
RegisterStartupScript("StartUp", script);
Response.Redirect("NewAppointment.aspx");>
Because of this Page is redirecting to another page and pop up is not coming
Regards,
Amit patel
|
|
|
|
|
In that case, you shouldn't use Response.Redirect on the server. Do the redirect within your script:
...
script += "window.location.href='http://Myserver/Myclient/NewAppointment.aspx';";
...
Regards
Sebastian
|
|
|
|
|
if you can do this with javascript then
you can use alert box like this alert(pass the value of generated id value)
and then redirect to next page.
|
|
|
|
|
Lol, thanks again for repeating the answer. Saying something twice is better than once
|
|
|
|
|
Page.RegisterClientScriptBlock("redirect", "<script>alert('You will be redirected in anoher page!'); window.location='default2.aspx';</script>");
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.
|
|
|
|
|
Hi ,
Thanks all
Page.RegisterClientScriptBlock("redirect", "<script>alert('You will be redirected in anoher page!'); window.location='default2.aspx';</script>");
This code is working fine
Thanks blue boy
|
|
|
|
|
You are welcome.
I Love T-SQL www.aktualiteti.com
"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.
|
|
|
|
|
hi all
i have master page and the content page, in my content page i show some product details in the gridview.there will be more product in the future, so i need to do is show some of product time to time without refresh the page (Asynchronously), i tried with using XMLHttpRequest request but how can set the timeout period for that, it should change details each 1 min in the page.
Pls help me to do this, What is the best way to do this
Thanks
|
|
|
|
|
|
hi
is there any control to do that in ajax, becous i want refresh those product details without any interact(without any user click any button).its should change the content automatically.
Pls reply to me this bit urgent.
Thanks
|
|
|
|
|
indSoftware wrote: is there any control to do that in ajax, becous i want refresh those product details without any interact(without any user click any button).
Yes !
Ajax Timer Control and Update Panel.
Have a look on my reply for details !
|
|
|
|
|
hii
Yes that right, this is working. thankss very much.
by the way cant we do that usign XMLHttpRequest, becous i think its light weight to the page also,this is just have a idea.
Thanks again
|
|
|
|
|
indSoftware wrote: by the way cant we do that usign XMLHttpRequest
Yes, That because AJAX is all about XMLHttpRequest
|
|
|
|