473,498 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB questions in .NET env.

4 New Member
I am trying to execute the following steps so that excel gif button will show up but instead I am not getting anything. Please provide your help. Here is the code.

Expand|Select|Wrap|Line Numbers
  1. </SCRIPT>
  2. var myLocation<%=""%>                  
  3. var myLocation<%=myI%>
  4. var ReportName<%=myI%> = "Time in System Report"
  5. var SQLStr<%=myI%> = escape("<%=SQLStr%>");
  6. myLocation<%=myI%>="rMetricXL.aspx?RiskTable=" + SQLStr<%=myI%> + "&ReportName=" + ReportName<%=myI%>
  7. </SCRIPT>
  8. <a HREF=myLocation<%=myI%><img src="images/excelreport2.gif" BORDER="0" alt="Excel version of home list"></a>
Oct 29 '08 #1
8 969
Plater
7,872 Recognized Expert Expert
What exactly are we looking at here?
It doesn't quite match the pattern of ASP.NET or html?
Oct 29 '08 #2
mmoza
4 New Member
What exactly are we looking at here?
It doesn't quite match the pattern of ASP.NET or html?
It is a combination of HTML, VB and Javascript. The file extenstion is aspx. The below part of the code does not work or I don't know how to make it work.

Expand|Select|Wrap|Line Numbers
  1. <TR>
  2. <TD ALIGN="CENTER" COLSPAN="15">
  3. <SCRIPT>
  4. var myLocation<%=""%>  
  5. var myLocation<%=myI%>
  6. var ReportName<%=myI%> = "Time in System Report"
  7. var SQLStr<%=myI%> = escape("<%=SQLStr%>");
  8. myLocation<%=myI%>="rMetricXL.aspx?RiskTable=" + SQLStr<%=myI%> + "&ReportName=" + ReportName<%=myI%>
  9. </SCRIPT>
How can I translate the above script in the HREF so that a button is displayed and on click a report is generated.

Expand|Select|Wrap|Line Numbers
  1. <a HREF="rMetricXL.aspx?RiskTable=javascript:escape("<%=SQLStr%>")" "&ReportName=" + ReportName<%=myI%>> <img src="images/excelreport2.gif" BORDER="0" alt="Excel version of home list"></a>
  2. </TD>
  3. <%myI = myI + 1%>
  4.  </TR>
Oct 29 '08 #3
Plater
7,872 Recognized Expert Expert
Well you didn't name your <script> type, you should be including the type.
<script type="text/javascript" language="Javascript">
That should help some.
I am not positive that <% %> notation works inside the <SCRIPT> tags?
I would recommend using the alert() function to see what your variables contain, perhaps they are not getting the values you think that they should?
Oct 30 '08 #4
Curtis Rutland
3,256 Recognized Expert Specialist
Please enclose your posted code in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use [code] tags in future.

MODERATOR
Oct 30 '08 #5
mmoza
4 New Member
Well you didn't name your <script> type, you should be including the type.
<script type="text/javascript" language="Javascript">
That should help some.
I am not positive that <% %> notation works inside the <SCRIPT> tags?
I would recommend using the alert() function to see what your variables contain, perhaps they are not getting the values you think that they should?
Thanks for your reply. They have not mentioned <script> type in the code. The code is exactly what I posted earlier. I am not sure if this piece of code is Visual Basic or VB script. They have not specified <script type="text/javascript"> language="Javascript"> above these lines of code so I am guessing it is either VB script or visual basic. But I was also told that 'escape' is a javascript.
Oct 30 '08 #6
Curtis Rutland
3,256 Recognized Expert Specialist
Tell me, does the file end with .asp or .aspx?
Oct 30 '08 #7
mmoza
4 New Member
Tell me, does the file end with .asp or .aspx?
The file ends in aspx
Oct 30 '08 #8
Plater
7,872 Recognized Expert Expert
They have not mentioned <script> type in the code. The code is exactly what I posted earlier.
I saw that it was not specified, I am saying that you NEED to specify it. It looks like javascript.
Oct 30 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

0
4068
by: softwareengineer2006 | last post by:
All Interview Questions And Answers 10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP) I have listed over 10000 interview questions asked in interview/placement test papers for...
0
4544
by: connectrajesh | last post by:
INTERVIEWINFO.NET http://www.interviewinfo.net FREE WEB SITE AND SERVICE FOR JOB SEEKERS /FRESH GRADUATES NO ADVERTISEMENT
2
7150
by: freepdfforjobs | last post by:
Full eBook with 4000 C#, JAVA,.NET and SQL Server Interview questions http://www.questpond.com/SampleInterviewQuestionBook.zip Download the JAVA , .NET and SQL Server interview sheet and rate...
4
2493
by: Drew | last post by:
I posted this to the asp.db group, but it doesn't look like there is much activity on there, also I noticed that there are a bunch of posts on here pertaining to database and asp. Sorry for...
8
7948
by: Krypto | last post by:
Hi, I have used Python for a couple of projects last year and I found it extremely useful. I could write two middle size projects in 2-3 months (part time). Right now I am a bit rusty and trying...
0
1472
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7...
1
1600
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7...
0
4465
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7...
0
3410
by: reema | last post by:
EJB Interview Questions http://interviewdoor.com/technical/EJB-Interview-Questions.htm CSS Interview Questions http://interviewdoor.com/technical/CSS-Interview-Questions.htm C Interview Questions...
0
2917
by: reema | last post by:
EJB Interview Questions http://interviewdoor.com/technical/EJB-Interview-Questions.htm CSS Interview Questions http://interviewdoor.com/technical/CSS-Interview-Questions.htm C Interview Questions...
0
6993
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7162
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7197
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6881
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4899
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4584
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.