|
As I wrote upstair, I simplify the problem to a short code. Can you try to help me on this code. I think it will help me to the big one too.
The problem is that I do not see the picture.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<script language="javascript" type="text/javascript">
// <!CDATA[
function Button1_onclick() {
document.getElementById("img1").src="C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water lilies.jpg"
}
// ]]>
</script>
</head>
<body>
<form id="form1" runat="server">
<img src="" style="width: 96px; height: 96px" id="img1" />
<input id="Button1" type="button" value="button" önclick="return Button1_onclick()" />
</form>
</body>
</html>
Thank you,
Eric H.
|
|
|
|
|
Hi friends.
I have One table in which i have one field of projectTitle.
I want to bind this projecttitle to autocomplete text of textbox.
When I start to wrting in textbox, all project title will be appear in autocomplete text.
How can I performe this task?
Plz give me right solution
Thanks In adavance
Pathan
---------------------------------------------------
|
|
|
|
|
Hi Pathan,
You can use AJAX to archive this...
<< >>
|
|
|
|
|
Hi I have a question:
how to assign QueryString value to a variable, that should return unique ID of a user from ASPDBNET table.
I used wrote this way:
string id=Request.QueryString["UserID"];
but it doesn't assigns any value...
Thank u
|
|
|
|
|
string id=Request.QueryString["UserID"].ToString();
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
I'm sorry, but now it gives me this kind of exception:
System.NullReferenceException was unhandled by user code
Message="Object reference not set to an instance of an object."
Source="App_Web_p-lbdwwh"
Thank you
|
|
|
|
|
It gives error becoz ur quiry string is null.
check condition first
if(Request.QueryString["id"]!=null)
{
code here
}
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
what is the url? is this something like yourwebpage.aspx?Userid=???
<< >>
|
|
|
|
|
|
Can you put the break point there and debug the code..to see if there is any element in querystring collection or not?
<< >>
|
|
|
|
|
Yes, it shows the value of UserID, but doesn't assign it
|
|
|
|
|
use this one man
Dim strcom As String
strcom = Request.QueryString.GetValues("CID")(0)
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
|
|
|
|
|
Oh, Could you write it in C#, please, couse I'm not familiar with VB at all.
Thanx
|
|
|
|
|
string strcom = Request.QueryString.GetValues("CID")();
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
|
|
|
|
|
It shows me the error: Method name expected
|
|
|
|
|
Oh my God, I'm sorry,
I've found the error,
Thank you guys!
|
|
|
|
|
Piyush Vardhan Singh wrote: string strcom = Request.QueryString.GetValues("CID")();
|
|
|
|
|
i need to select a picture from sql server, picture is stored as path and have to display it in the picture box. now i dont understand how to covert it to picture box type
software student
|
|
|
|
|
You can create a bitmap image from image path you have stored in sql server and then set the picture box image property to your bitmap.
Bitmap bmp = new Bitmap("myPath");<br />
pictureBox.Image = bmp;
drinking beer is fun
|
|
|
|
|
i m retrieving path from sql
if i write like this
Bitmap bmp = new Bitmap(dr1.GetValue(5));
or this
Bitmap bmp = new Bitmap("dr1.GetValue(5)");
it is giving exception....
software student
|
|
|
|
|
one thing to b noted i m working wid windows forms
software student
|
|
|
|
|
You'll probably have to store the image to HDD, so the picture box can be given a path to display from.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
ooooooooppppppss wrote: b
ooooooooppppppss wrote: wid
Please don't talk like a moron.
ooooooooppppppss wrote: ForumASP.NET
ooooooooppppppss wrote: windows forms
If you're working with Windows forms, why on earth did you ask in the ASP.NET forum ?
Your job is trivial, just read the image data, create a Bitmap in memory, and pass it through to a picture box.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
I faced a situation that needs a multiple inheritance. Unfortunately .net is not supporting it. I cannot use an "interface" for this purpose.
Let me tell you the scenario. I have a data layer class say "clsDL". There is another class for the common functions say "clsCommon"(It is common for all modules). I have several modules in my project (several projects in a solution) each module has its own common class for the common functions in that moule. Every form in the GUI layer has a class in Business layer.
The data layer class inherited to "clsCommon" and all the common classes for each module. Now i want to inherite the "clsCommon" and the common class for the particular module into a particular business layer class. I don't want to merge the common functions. If i implement the interface, I have to make an interface for anyone of the two common class and declare the object of that interface class in the business layer class. The problem is that the functions are in these common classes is not same. Therefore, I can't take the advantage of "interface". How can I solve the problem?
P.S: Sorry if I make you confused!
Ken,Mexico(Guanajuato)
|
|
|
|
|
Ken.Hamilton wrote: Every form in the GUI layer has a class in Business layer.
This doesn't make sense, and ties the two layers too closely together.
Ken.Hamilton wrote: Now i want to inherite the "clsCommon" and the common class for the particular module into a particular business layer class.
This sounds convoluted and messy. Why would your data layer and business layer have the same base class ?
The answer is to redesign, this doesn't sound at all right to me.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|