|
I don't know how to recreate it in javascript.
Is there anyway I can pass it from vb to js?
|
|
|
|
|
BobsAfro wrote: I don't know how to recreate it in javascript.
Here is an example of how you create a string containing code. It's in C#, though.
string code = "var s = '" + theString.Replace("\\", "\\\\").Replace("'", "\\'") + "';";
BobsAfro wrote: Is there anyway I can pass it from vb to js?
No. You can not pass a variable from the server to the browser, you can only send the value of a variable.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
Forgive me but I do not know how building a string in
c# is going to help? Please could you explain?
|
|
|
|
|
BobsAfro wrote: Forgive me but I do not know how building a string in
c# is going to help? Please could you explain?
Maybe I was unclear. Of course you don't have to build the string using C#, any language that you happen to be using works. The example that I presented was in C#, as that's what I am using.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
Forgive my stupidity but I do not understand how this wil help.
When a user clicks on the grid vb builds a string depending on what was clicked.
this string is then used as the querystring for a redirection.
How does building a string of code help?
|
|
|
|
|
If you want to do anything involving another window, you have to do it in the browser, not in the server code. If you have a string that you need for the redirection, then you have to recreate that string in the Javascript code, so that you can use it there.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
Okay. Is it possible to take values from the gridiew to buidl
the string in javascript?
|
|
|
|
|
That depends. You can not access the gridview itself, as that does only exist on the server. You might be able to extract values from the html code that the gridview creates.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
The obvious thing to do is to put a property in your code behind that returns the string you want to redirect to, and then create the link in your aspx as usual, but set the link to be <%= your property name %>. The <% creates a block of code behind, and the = means it just renders the string.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I don't quite understand. The string has to be built onRowCommand.
So I cannot build it in advance. It needs to build the string
based upon what has been clicked on in the grid.
|
|
|
|
|
Anyone know hwo I can call a javascript function from within vb.net passing it a variable?
I have a gridview and depedning on the clicked cell it needs to construct a string (in vb.net)
and then use that string to recirect another window (javascript).
I have to use javscript for redirtection because I cann't find a way to
redirect another window from vb.
BOB
|
|
|
|
|
ASP.NET ? You can call registerclientscriptblock to insert jscript code into your page.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I am trying to connect a mobile phone to the pc's serial port using a data cable(Using VB 6.0 or VB .net),using which i can send sms.. can anyone help me in this regard..if you used something similar in ur project.. Hope i wil get a suitable reply..
Thanks,
Namritha
email:thelma.namritha@gmail.com
namritha
-- modified at 9:16 Thursday 21st December, 2006
|
|
|
|
|
I'm not familiar with programming mobile phones and I'm not sure what sms is short for but I'll tell you what I know. In vb.net there is a standard control called "serial port". This can take care of most of the nity gritty details of serial port communication. VB6 also has a control that does the same thing but I think it has a different name like COMM something. Also make sure that the programs on the pc end and the cell phone end have the same settings baud rate, parity, ect......
I hope this helps,
Mike
|
|
|
|
|
Thank you for your valuable suggestion.I Am trying with the communication control available in vb 6.0,which has the capability of connecting with any one of those serial ports
namritha
|
|
|
|
|
Hi,
I am using XMLWriter.WriteCData(stringdata) to write data in xml CDATA block, but i throw exception when data size gone more than 10-12 mb.
|
|
|
|
|
And that exception would be .....?
The only thing you really have to watch out for is if the output string contains the string ]]> . You cannot have that in a CDATA block for obvious reasons.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i have used the following coding but i got error
new sqlcommand("Select * from tblcom where date between d1 as d2 and name='"+s+"'")
|
|
|
|
|
Rmesh wrote: new sqlcommand("Select * from tblcom where date between d1 as d2 and name='"+s+"'")
Did you check an SQL book for the correct syntax?
|
|
|
|
|
Ramesh
new sqlcommand("Select * from tblcom where date between" & d1 & "and" & d2 & "and name='" & s & "'")
Check this out,This may solve ur problem
Regards,
Manowj
|
|
|
|
|
|
Colin Angus Mackay wrote: Please learn about SQL Injection Attacks and how to prevent them
You beat me to it
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
PaulC1972 wrote: You beat me to it
Feel free to go and tell him anyway.
|
|
|
|
|
Rmesh wrote: i have used the following coding but i got error
new sqlcommand("Select * from tblcom where date between d1 as d2 and name='"+s+"'")
There are a number of reasons for an error, but you don't tell us what the error is. You seem to think we can guess.
Possible errors for the above code:
* The table tblcom doesn't exist
* The column date doesn't exist
* d1 is not a valid column name
* d2 is not a valid column name
* the keyword as is use incorrectly. Should this be and ?
* the injected value s is causing a problem somehow.
Please also read up on SQL Injection Attacks and how to prevent them[^]
|
|
|
|
|
Hello
I have created a custom installer that will display a form after the installation is completed.
There is the code for the installer class
<br />
Protected Overrides Sub OnAfterInstall(ByVal savedState As System.Collections.IDictionary)<br />
MyBase.OnAfterInstall(savedState)<br />
Dim myform As New Form1()<br />
myform.Show()<br />
End Sub<br />
I have added the project outputs on both the install and commit nodes in the custom actions.
When the installer finishes installing it will quickly flash the form and then disappear.
Can anyone tell me where I am going wrong.
Thanks in advance,
Steve
|
|
|
|