|
check this icon:
http://www.15seconds.com/issue/030820.htm
I have never done this before, not sure how easy it is though.
We are not a Code Charity
|
|
|
|
|
Hi i have used one of my form javascript in body load event...,
When page getting postback the javascript also firing once again...,
Ex:
i have checkbox list its autopostback true..,
If select any of the checkbox with postback event its firing...,
Now my problem is,
I dont want to use postback in my form,so i used updatepanel...,
And for my checkbox list in inside the update panel...,
And i given triggers event of checkbox...,
If i use that whenever updatepanel refresh the javascript also want to fire...,
But its not doing that,in normal postback its firing body load javascript..,
Y its not firing in update panel refresh?,
How to solve this?,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Once you start using UpdatePanel, the page postback event is completely handled my Microsoft Ajax. So usually your page will not postback and onload event page will not work. To make it work, use Ajax ClientSide Scripting.
For Example, add the below code after the ScriptManager tag in the HTML source.
<script>
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(funcPageLoaded);
function funcPageLoaded(){
alert("Page Loaded");
}
</script>
|
|
|
|
|
hello frnds,
i have a grid containing template column of textboxes. i entered values
in textboxes and go to next page.
if i back to the grid page all the textboxes values are cleared and i have to reentered that values.
how can i persist them between postbacks ???
any suggesation ??? helpful links ???
thankx in advance
koolprasad2003
|
|
|
|
|
Read the values and keep it in a session when page index changes. You can read it back when you come back to that page.
|
|
|
|
|
I want to migrate CFM to asp.net , if any software or tool you know then please help me
|
|
|
|
|
I don't thin there is a readymade shrink-wrap tool for you for that purpose. However, the following MSDN guideline article should help you get started:
http://msdn.microsoft.com/en-us/library/aa479305.aspx[^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
i included a project in a vss.
on taking the project from vss by setting the working folder and getting the latest version and compiling the project, it again asks to generated the files in a new folder
for eg.
ON setting the working folder in c:\inetpub\wwwroot\projname and including the files in the projname folder, on compiling it again asks to include the same files in C:\inetpub\wwwroot\projname\projname folder.
how this is happening???
|
|
|
|
|
hai all am using the mvc framework i want to redirect an aspx page from a controller class that file is a pure cs file how it can be made possible
HI
|
|
|
|
|
hi,
it the class file is in same project try with directly
RESPONSE.REDIRECT(//PAGE NAME)
thankx
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
You'd need the HTTP context to be passed in, so you could access the Response object.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
good morning,i am working with asp.net3.5,i got one problem ie we r devloping one application,that should be in english and spanish,defalt language is english.for spanish we wrote resourse file for every page,when we r cliking spanish button,only one page is changing 2 spanish,remaining pages r not affected.we whant r change all the pages in spanish.and in any page we whant 2 change lanuage,that should be affect....so plz help me
thankq
naveen
|
|
|
|
|
How can I refresh a page in ondemand?
|
|
|
|
|
You can use
window.location.href = sURL;
OR
document.submit()
It's depend on your requirement that where you wants.
Parwej Ahamad
R & D with IIS 5.0/6.0
|
|
|
|
|
I have a page its displaying some data from database table.
when ever data changed in database table the page has to refresh.
It has to refresh only when data changed in database table.
Its not periodically refresh.
|
|
|
|
|
You need to referesh the page periodicaly like after 30 sec.
Add this tag on your aspx page:
<META HTTP-EQUIV=Refresh CONTENT="30; URL=http://www.htmlhelp.com/">
Then load data on Page Load events.
Parwej Ahamad
R & D with IIS 5.0/6.0
|
|
|
|
|
I think thought we had already given you an asnwer to this post previosuly
We are not a Code Charity
|
|
|
|
|
I wirte a web application use 2.0.
I drop a Login Cotrol in MasterPage.
I have a page named "page-a", it can be view after Logined.
if user do not login, when view it will redirect to LoginPage.
but I don't have LoginPage, achieve Login in MasterPage.
How to specify LoginPage in Web.Config?
Or other resolvent.
Thanks.
|
|
|
|
|
Hi,
Been checking around the net for the above subject and found a lot of solutions but seems not able to work for me.
This is my situation, I am using a textbox with type='file' to get the image from local. Then when user clicks a button, it suppose to convert the picture user chose into binary data and save it into the MSSQL database which in the column declared as binary(5000). When the user load the page again, I want the system to get the binary data from the database, covert it back to the original format, and place it in the tag.
Here is the code I'm using but I suspect something is just not right.
byte[] imagecontent = null;
if (fudLogo.Value != "")
{
string strfile = System.IO.Path.GetFileName(fudLogo.PostedFile.FileName);
string strexten = System.IO.Path.GetExtension(fudLogo.PostedFile.FileName);
if (strexten.Equals(".jpg") || strexten.Equals(".JPG") || strexten.Equals(".gif") || strexten.Equals(".GIF") || strfile.Equals(""))
{
System.IO.Stream stream;
Int64 imagesize;
int imgstatus;
imagesize = fudLogo.PostedFile.ContentLength;
stream = fudLogo.PostedFile.InputStream;
imagecontent = new byte[stream.Length];
}
}
else
{
imagecontent = this.strCpyLogo;
}
if (this.staff.UpdateCompany(this.txtCompanyName.Text, imagecontent, this.txtAddress1.Text, this.txtAddress2.Text, this.txtAddress3.Text,
this.txtPostCode.Text, this.txtState.Text, this.txtCountry.Text, Application["compid"].ToString()) == true)
{
Response.Redirect("E09-WorkingDayM.aspx?compid=" + Application["compid"].ToString() + "&empid=" + this.strEmpId + "&resetting=1");
}
else
{
this.lblErrMsg.Text = "Could not update company info at this moment.";
}
I tried to view the raw binary data just to check whether it is right by using below code
string aa = "";
for (int i = 0; i < imagecontent.Length - 1; i++)
{
aa += imagecontent[i].ToString();
}
this.Label11.Text = aa;
What I got is
000000000000000000000000000000000000000000000000000000000............
Which I feel it is just not right.
This is my first time dealing with binary data, hope to get some expert advice from here. Thanks.
|
|
|
|
|
J Liang wrote: imagecontent = new byte[stream.Length];
This is the problem. You are initializing a new byte array and not copying stream contents to this array.
if (strexten.Equals(".jpg") || strexten.Equals(".JPG") || strexten.Equals(".gif") || strexten.Equals(".GIF") || strfile.Equals(""))
{
System.IO.Stream stream;
Int64 imagesize;
int imgstatus;
imagesize = fudLogo.PostedFile.ContentLength;
stream = fudLogo.PostedFile.InputStream;
imagecontent = new byte[stream.Length];
stream.Read(imagecontent,0,imagecontent.Length);
}
|
|
|
|
|
Thanks, it works now.
I got this
25521625522401674707370011107207200255225310069120105102007373420800070151201000098000161209000108000
491202700011800050120....
Is this what I suppose to get? The numbers do turn different as I upload different pictures.
Now I know there is a lot of solutions out there to turn the above binary back to an image file but I just could not find one working, is there any code which any of you are using that is working? Can shade some light for me? Thanks.
|
|
|
|
|
J Liang wrote: Is this what I suppose to get? The numbers do turn different as I upload different pictures.
It depends on the file you are uploading. This will change for image to image.
J Liang wrote: out there to turn the above binary back to an image file
using (MemoryStream stream = new MemoryStream(b))
{
using (System.Drawing.Image image = System.Drawing.Image.FromStream(stream))
{
}
}
Hope this helps
|
|
|
|
|
I'm not really understand this line
Do you mean to assign System.Drawing.Image image into my
<asp:image id="imgLogo" runat="server" height="120px" visible="True" width="120px" />
This is what I did from your code given
using (MemoryStream stream = new MemoryStream(strCpyLogo))
{
using (System.Drawing.Image image = System.Drawing.Image.FromStream(stream))
{
}
}
Where strCpyLogo is in type byte which I retrieve from my database. In the database, strCpyLogo shows <binary data=""> which i assumed it had already saved into the database.
I'd tried this.imgLogo but could not find any command that seems logic to me to assign System.Drawing.Image image to it.
|
|
|
|
|
To set that image to a image control, create a seperate page say "DisplayImage.aspx". As I said in the last post, take Image instance and call image.Save(Response.OutputStream,ImageFormat.Jpeg) which save the image to output stream. The image format varies depending on your image extension. Also don't forget to set the response content type like Response.ContentType = "image/jpeg" (Only for jpg).
In the image control, set image url as this page(DisplayImage.aspx), you are done.
|
|
|
|
|
I got a error message when I run the code
Exception Details: System.ArgumentException: Parameter is not valid.
on this line
using (System.Drawing.Image image = System.Drawing.Image.FromStream(stream))
I am doing this in my code
byte[] strCpyLogo;
Response.ContentType = "image/jpeg";
using (MemoryStream stream = new MemoryStream(strCpyLogo))
{
using (System.Drawing.Image image = System.Drawing.Image.FromStream(stream))
{
}
}
Where strCpyLogo was a binary data from the database
|
|
|
|