|
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 )
|
|
|
|
|
Yes i think so. I am sad that my all works become useless. I have work again from the scratch. Can you please give me any useful links of articles about this subject?
Thank you
Ken,Mexico(Guanajuato)
|
|
|
|
|
Not off hte top of my head. Just remember, the layers are seperate, they shouldn't have any need for any common base classes, and the business layer should be built around the different business objects, not the different pages.
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 )
|
|
|
|
|
Ok. Even though I didn't fully understand what you trying to say, thanks for your response and the time to spend me.
Now I am going to sit back and starting to learn what is Data layer, what is Business layer from all the possible resources.
Ken,Mexico(Guanajuato)
|
|
|
|
|
Hello everyone,
I have webpage1 that sends email when button1 is click. I want to go back to previous page once button1 is click so I use history.back code.
Below is my sample code for your reference.
If Page.IsValid And SaveIssue() Then
Dim msg As New MailMessage
msg.To = Test@dc.com
msg.From = "ACSC@noreply.com"
msg.Subject = "Reply- " & txtTitle.Text
msg.Body = "Hello"
msg.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "abc.com"
SmtpMail.Send(msg)
msg = Nothing
btnDone.Attributes.Add("onClick", "history.back(); return false;"
End If
My problem is, it will only work on the second time you will click button1. Kindly advise for the right code. Thanks in advance.
|
|
|
|
|
History.back to me, is not the right way as I found it useless in firefox. So Simply navigate to your WebForm1.aspx like
<br />
btnDone.Attributes.Add("onClick", "window.location = 'WebForm1.aspx'; return false;"<br />
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
Hello,
Its because I have some control in my previous page that I want to retain the value, thats why I just simply use history.back.
Do you have any suggestion?
|
|
|
|