|
Hi Guys,
How can I show the value of textbox1.text and textbox2.text from the other aspx thru msgbox. Because, when I click the button there's no msbox will popup.
I hope you can send me a sample asp.net code vb coding on how to do it. Right now I am using session.
Thanks in advance Guys
hifiger2004
|
|
|
|
|
I think you are asking for code to show a message box.
Here is some code I have used for vb.net .net version 1.1
Private Sub ShowMessageBox(ByVal aMessage As String)
'This procedure will cause a dialog box to pop up with whatever message is passed in.
aMessage = aMessage.Replace(vbCrLf, "\n").Replace("""", "'")
Dim myScript As New StringBuilder
With myScript
.Append("<script>")
.Append(Environment.NewLine)
.Append("alert(""").Append(aMessage).Append(""");")
.Append(Environment.NewLine)
.Append("</script>")
Page.RegisterStartupScript("msg box", .ToString())
End With
End Sub
The code is a little different if you are using .net 2.0.
I think you would continue to need to save the text box data in session, if you need it on another page.
Hope that helps.
Ben
|
|
|
|
|
hifiger2004 wrote: How can I show the value of textbox1.text and textbox2.text from the other aspx thru msgbox. Because, when I click the button there's no msbox will popup.
You may be labouring under a misapprehension here - if you show a message box on the server side - i.e. in your codebehind - then it will be shown ON_THE_SERVER, not on the client. If you're working on localhost, then you'll see it, but any clients connecting from other machines won't - but you will!
If you're adamant you want to use a messagebox-type output, then Session is the way to go, followed by either registering some startup script, or by slapping the values into some hidden fields , then using javascript to get the values out and alert() them...
"Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman"
(Lilly Allen / Kaiser Chiefs)
|
|
|
|
|
If the values are in the session, then all you need to do is write javascript code to show them in a message box when the form loads.
Posting your code would help us help you.
hifiger2004 wrote: Because, when I click the button there's no msbox will popup.
To make this work, you need to create a button on the client, which triggers the javascript on the client.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hello,
i m using mathod for uploading image:
int i=file.postedFile.ContentLength();
byte[] len=new byte[i];
sqlcommand.parameter.add("@image",len);
for retrieval:
SqlDataReader rd;
.......
byte[] barImage = (byte[])rd.GetValue(rd.GetOrdinal("image"));
Response.ContentType = "image/gif";
Response.BinaryWrite(barImage);
i m using SQl2005
and clumn is "image" type
but image shows unavailable image "cross mark"
what may be wrong pls help.
|
|
|
|
|
Are you sure it's a gif ? If you do a binary write of the data to the file system, do you get a GIF ? That's one way to break down the process, and work out which part is not working.
Response.End() is also good, to make sure nothing else gets sent. Also make sure your ASP.NET page is not writing debug info into the page.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Have you tried adding Response.Flush() at the end?
|
|
|
|
|
yes, sir
but still my problem is there ,is it database problem can i use other datatype for image.
pls help
|
|
|
|
|
Hi All,
I am using Rich Text Editor (JavaScript) and I need to save this Rich Text Editor Data (which is in html format) in text file.
Also I need to Save the file name in DataBase and I need to show this file in the Rich Text Editor's Text box when I come in edit mode.
Can anyone please help me...
Thanks in advance...
|
|
|
|
|
Which 'Rich Text Editor' are you using?
|
|
|
|
|
do you guys know how to boost up the search rank of your website
I heard few like putting useful text "web developement" etc etc in the home page
some also suggested me this
i really dont know the meaning
is there any kick on a** things to get it right up.
Belive me i have worked on website, so dont tell me "Site has to be good"
thanks
sagar
------------------------------
Its not the fall that kills you; it's the
sudden stop at the end.
|
|
|
|
|
Doesn't the rank reflect how many people link to you ? I mean, if it was just a simple trick, wouldn't everyone be doing it ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Doesn't the rank reflect how many people link to you ?
yes off course
Christian Graus wrote: I mean, if it was just a simple trick, wouldn't everyone be doing it ?
they have to be known and shred if there are any
does this depend on what is your web content (code text), as someone suggested me to put this in page
i really dont know the meaning :->
cheers
sagar
|
|
|
|
|
Christian Graus wrote: Doesn't the rank reflect how many people link to you ? I mean, if it was just a simple trick, wouldn't everyone be doing it
It's a lot more involved than that. Having more people link to you is going to heavily influence your ranking, but there are other factors to take into account.
For example, giving good descriptive 'title' and 'description' fields to a page helps a search engine decide what's important. Having clean URLs really helps too - http://my.site.com/research-into-crop-circles will score much higher than http://my.site.com/index.asp?id=5563. Using semantic tagging (e.g. correctly using nested HTML h1,h2,h3 tags to indicate sections) with clean HTML will allow a search engine to better pinpoint content.
|
|
|
|
|
I've put some suggestions elsewhere in this thread.
Sagar K. Godbole wrote:
This is nonsense - ignore whoever suggested this!
|
|
|
|
|
thanks
i will surely ignore this
cheers
sagar
|
|
|
|
|
Sagar K. Godbole wrote:
That is a google verification code for google webmaster tools. When you add a site to your google webmaster account they will generate a verification code for you to add to the site. It has nothing to do with page rank, however the webmaster tools may let you spot errors that could damage page rank, such as googlebot finding broken links.
Getting a good page rank really comes down to being linked from the right places, and the right places are sites that only link to worthwhile pages, and don't do link exchanges. In the end that means making a site with good, unique content that other people will want to link to without being asked.
|
|
|
|
|
thanks man,
sagar
|
|
|
|
|
Hi everyone,
I have page written the following code:
<object id="color" data="colorchooser.html" type="text/x-scriptlet" VIEWASTEXT><br />
</object>
And it works fine in IE6, but IE7 doesn't allow this code and show the unavailable image instead of the color pallete like IE6. I think it comes from the security of I7E, but I haven't had way to solve it yet. Is there someone help me?
Thank you very much,
Thai Nam
|
|
|
|
|
hi ,
can any body tell which are the sites which gives free tutorial on how to make strong logics in the programming
|
|
|
|
|
Well, normally I tell people to try google, but as I can't work out what you want, I'm sure google isn't helping you.
What are you using to program the web ? PHP ? ASP ? I assume not ASP.NET ( as there's another forum for that ). ASP certainly sucks for trying to organise your code nicely, is that what you mean ? I have no idea what 'strong logics' means.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
tauras81 wrote: strong logics
what is that, is it too strong for friday
|
|
|
|
|
Hi there
I need to be able to get the filename of an image on my page using javascript. I can get the directory of the image, but is there perhaps a way to just call the image filename. Any ideas, possiby available DOM commands or jscript methods written by anyone would be appreciated. Thank you in advance for any assistance.
Regards
Devin
|
|
|
|
|
So you're looking for a convience function sort of like .net's Path.FileName() method?
/\ |_ E X E GG
|
|
|
|
|
I guess you'd have to look at the src attribute, then strip off everything up to and including the final slash char - should be left with just the filename and extn then....
"Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman"
(Lilly Allen / Kaiser Chiefs)
|
|
|
|