|
Hi!
I have 2 questions:
1. I have say 2 DropDownList boxes, when I select Product A from the first DropDownList Product A options appear in the second DropDownList and visa versa?
2. How would I write a SP in SQL to check if the value is already in the DB? For instance, if someone wants to add "jeff" then SQL must first check to see if jeff exists. If he exists then SQL must use that value and not add a second jeff.
Thanks Guys and Gals!
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
hi I m not telling syntax just the approach
1)in first dropdownlist when u select a product , then retrieve the id of selected item & capture this event of item change . then in this event , retreive the options & populate the second combo
2) for sp
create procedure test ( val in , existsval boolean out )
as
select count(*) from [table] where value = val
if @@rowcount = 0 then
/* this value is not there in db */
existsval = false
end if
return look out for exact syntax of sp
Divya Rathi
|
|
|
|
|
Dear all;
I am using the WebBrowser control to access the elements of a web page. This has been done successfully.
Now that i can retrieve elements (paragraphs, headers, links, fonts...) through the IHTMLElement2 interface. I am trying to obtain the size of textual elements (paragraphs, headers ...) and compare them "see which ones are bigger than the others".
As far as i know, the size attribute for html elements can be accessed through the IHTMLCurrentStyle interface.
The problem now is:
IHTMLCurrentStyle::fontSize gets me the size in different formats ----> as it can be absolute size, relative size, length, and percentage.
or please have a look at this link:
---> Font Size
then click on: IHTMLCurrentStyle. The font size get be then obtained through: fontSize
Now guys, do u know anyway to compare those formats!!!
Another way i am thinking of is to get the height of a single line. this should be easier to make a judgment regarding which elements are bigger.But i do not know how to do that, any ideas ????
thank you
llp00na
-- modified at 7:14 Thursday 23rd February, 2006
|
|
|
|
|
Can i write SQL statement inside javascript function in order to matching data string inside my database. Its't possible??
|
|
|
|
|
I don't understand your question? If you are talking about client-side javascript (in the browser), I would not do it due to security reasons.
|
|
|
|
|
ok i have a existing asp page that was created by another programmer and i pulled it in visual studio and i put a button and a textbox on the page visualy and the page looks right when i view it in visual studio but all my objects are all over the place when i go the the web site can somebody help me with this
chad
|
|
|
|
|
The ASP server-side code (I assume you are not talking about ASP.NET) generates html that is only visible in the browser. Visual Studio can not determine what the code should look like at design time.
|
|
|
|
|
try adding the "runat=server" string when you insert a textbox or button. You will still see the HTML version of code when you view the source but this information isn't very helpfull for someone trying to steal your code.
When you create textboxes, dropdownlists, buttons even hyperlinks and images, use the asp:"%name%" tag. this will make your life much easier.
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
I am having trouble tring to finish a photo gallery. I currently have a simple on running at the moment with seven pictures that are all located on seperate pages. I want to combine them all to one and am having trouble with the javascript code. I know I need an array to set up the load of each picture with a target point. here is what I have so far on the page itself (no javascript at this time):
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="main.css" />
</head>
<body>
<div id="navigation">
<table>
<tr class="textnavigation">
<td class="previous"><span class="previous"><a href="tour6.html" title="Previous Photograph"><< Previous</a></span></td>
<td class="index" colspan="6"><span/></td>
<td class="next"><span class="next"><a href="tour7.html" title="Next Photograph">Next >></a></span></td>
</tr>
<tr>
<td class="thumbcell"><a href="tour4.html"><img src="tour4_small.jpg" /></a></td>
<td class="thumbcell"><a href="tour5.html"><img src="tour5_small.jpg" /></a></td>
<td class="thumbcell"><a href="tour6.html"><img src="tour6_small.jpg" /></a></td>
<td class="thumbcell selected"><img src="nwview_small.jpg" /></td>
<td class="thumbcell"><a href="tour7.html"><img src="tour7_small.jpg" /></a></td>
<td class="thumbcell"><a href="tour1.html"><img src="tour1_small.jpg" /></a></td>
<td class="thumbcell"><a href="tour2.html"><img src="tour2_small.jpg" /></a></td>
<td class="thumbcell"><a href="tour3.html"><img src="tour3_small.jpg" /></a></td>
</tr>
</table>
</div>
<div id="photograph">
<img src="nwview.jpg" />
</div>
</body>
</html>
I also want to see about making the thumb nails circle around the current picture being viewed. Any advice or links to get me a good start would be a great help.
-- modified at 11:54 Wednesday 22nd February, 2006
|
|
|
|
|
I have written following lines of code in javascript
function a()
{
var instance =new ActiveXObject("testDll.Class1");
document.write(instance.hello())
}
where testDll is a dll which i have registered and Class1 is its function
It gives me error "Automation server can't create object"
I cannot understand that why i m receiving this error Is there any mistake in my code or whats solution??
|
|
|
|
|
|
How i can call a dll function in javascript??
|
|
|
|
|
Use AJAX.
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
If the DLL exposes an automation interface, and you're running in an environment that allows access to this (IE with certain configurations), you can make calls to the DLL that way.
In general, it's a bad idea to rely on being able to call native code when designing for the web. Find another means of accomplishing what you need.
|
|
|
|
|
MimeMultipart multipart=new MimeMultipart("alternative");
MimeBodyPart contype=new MimeBodyPart();
contype.addHeaderLine(
"MIME-Version: 1.0; Content-Type:mutipart/alternative; boundary=boundrytexthtml");
MimeBodyPart plainPart = new MimeBodyPart();
plainPart.addHeaderLine(
"--boundarytexthtml; Content-Type: text/plain; charset=\"iso-8859-1\"");
plainPart.setText(textstr.toString());
plainPart.addHeaderLine(
"--boundarytexthtml; Content-Transfer-Encoding: quoted-printable");
MimeBodyPart htmlPart = new MimeBodyPart();
htmlPart.setContent(htmlstr.toString(), "--boundarytexthtml; text/html; charset=\"iso-8859-1\"");
htmlPart.addHeaderLine(
"--boundarytexthtml; Content-Type: text/html; charset=\"iso-8859-1\"");
htmlPart.addHeaderLine(
"Content-Transfer-Encoding: quoted-printable; --boundarytexthtml--");
multipart.addBodyPart(contype);
multipart.addBodyPart(plainPart);
multipart.addBodyPart(htmlPart);
BodyPart embedImage=new MimeBodyPart();
Enumeration ken = imgHash.keys();
Enumeration ven=imgHash.elements();
while(ken.hasMoreElements() || ven.hasMoreElements())
{
key = (String) ken.nextElement();
value=(String) ven.nextElement();
System.out.println(key+" : "+value);
String URLDataString="file:"+value;
DataSource ds=new URLDataSource(new URL(URLDataString));
embedImage.setDataHandler(new DataHandler(ds));
embedImage.setHeader("Content-ID","<key>");
multipart.addBodyPart(embedImage);
}
message.setContent(multipart);
message.setSentDate(new Date());
Transport.send(message);
} catch (AddressException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Regards,
Deepak More
Software Developer
Mumbai
|
|
|
|
|
Hi all,
I really need to convert the C# code below into VB. If possible can advise me where is the most approriate place to place this portion of code. The code is to wire the parent datagrid for the ItemCreated event and ItemDataBound event.
Please help me.
private void InitializeComponent()<br />
{<br />
this.load += new System.EventHandler(this.Page_Load);<br />
this.dgRegion.ItemCreated += new DataGridItemEventHandler(dgRegion_ItemCreated);<br />
this.dgRegion.ItemDataBound += new System.Web.UI.WebControls.DataGridItemEventHandler(this.dgRegion_ItemDataBound);<br />
}
Thanks in advance,
Chiari
|
|
|
|
|
This is just code to bind event handlers. VB does this by itself. I believe the way to do it would be to use:
Handles Page.Load
Handles dgRegion.ItemCreated
Handles dgRegion.ItemDataBound
for the respective methods.
|
|
|
|
|
http://www.carlosag.net/Tools/CodeTranslator/Default.aspx
This might help u. Check it
Srinu
|
|
|
|
|
hi, i have just created a virtual earth website and would lyk to create a drawing tool to be able to draw shapes on the map.
i came across this website,
<title>Untitled Page
function myDrawFunction()
{
var a = document.getElementById("textBox1").value;
var b = document.getElementById("textBox2").value;
var c = document.getElementById("textBox3").value;
var d = document.getElementById("textBox4").value;
alert("The value of a,b,c,d= "+a+","+b+","+c+","+d);
jg_doc.setColor("#00ff00"); // green
jg_doc.fillEllipse(a, b, c, d);
//jg_doc.drawLine(a,b,c,d); // co-ordinates related to the document
alert("The value of a,b,c,d= "+a+","+b+","+c+","+d);
jg_doc.setColor("red");
jg_doc.drawPolyline(new Array(50, 10, 120), new Array(10, 50, 70));
jg_doc.paint(); // draws, in this case, directly into the document*/
}
var jg_doc = new jsGraphics(); // draw directly into document
var jg = new jsGraphics("myCanvas");
var jg2 = new jsGraphics("anotherCanvas");
//doc.myDrawFunction();
SOMEONE HELPPPPPPP... thanz
|
|
|
|
|
I need to launch a windows form from a CGI, someone can help me?
Thanks.
|
|
|
|
|
The CGI program runs on the server. If you could launch a Windows program, it would run on the server hidden form the client. It will not run on the client's machine. Anyway, launching a Windows program would be a clear security violation of the client's machine. Nevertheless, you can get close to what you want with .NET's smart client (.NET Framework has to be installed on the client).
|
|
|
|
|
Hi,
Currently I am running an ASP based intranet site that utilizes a older VB6 activex control.
This control reads system info, registry, apps, etc. and posts them back to the site to be evaluated and display the appropriate items according to the results. I would like to to build this solution in ASP.NET but build a dll that can be accessed from web code instead of running and posting back to the site. I have looked for example code but really haven't found any that sheds light on what I want to do. Any assistance would be greatful.
CA
-- modified at 13:53 Monday 20th February, 2006
|
|
|
|
|
fafsfaf wrote: I would like to to build this solution in ASP.NET but build a dll that can be accessed from web code instead of running and posting back to the site.
Could you explain this? What are you referring to when you say "accessed from web code"?
|
|
|
|
|
To clarfy, the client currently visits the page and downloads the activex control that runs with a timer that gathers the information and posts back to another page depending on the results as determined by the activex control. I guess I am looking for a way to build the site that would have some web control that gets installed on the client then can be called from the web page, if I can even do this. I am trying to move most of the processing to the site instead of the client where authentication issues are starting to arise. I am not really just starting out with programming and this is a very large undertaking for me. I have been looking at different literature on the subject but I am wondering do I use SOAP or will the ASP.NET give me the ability to accomplish this. I just alittle over my head on this one and wanted some advise on where to start.
Thanks
CA
|
|
|
|
|
However you do it, you're going to have authentication issues. Anything that you install on a client from a webpage is going to require assent from the user. If this is in a corporate environment, can you be assured that the user will agree? If not, you may want to look at other options, such as embedding a .NET based service into the OS build image that will automatically post information up to any back-end databases you may have on a periodic basis.
If this is not in a corporate environment - good luck! I know that I certainly wouldn't be allowing an activeX control to install that scans registry and installed applications.
|
|
|
|