|
This question really belongs in the ASP.NET Forum, regardless of the language it's written in.
But, if I understand this right, you want one ASP.NET web page to read the values stored in a textbox in another ASP.NET site page that is in an entirely different site (or application)?
If that's true, then you can't. There is no way for the server to query the client machine for what's in one of its textboxes. Once ASP builds the HTML and sends it to the client, all traces of it are lost forever. The ASP page has hidden fields in it that maintain the state of the page and are sent back to the server on every page request, thus telling the application on the server what the values of all the control on the page are. Once the processing on that request is finished, that hidden field is updated with the values that are going to be put into the page and then the page is sent to the client and destroyed on the server.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
can some 1 plz send me a cyber cafe management system in vb.net code? the system include the server client connection and client computer remote control function, can some 1 plz plz help me on this? thnkz a lot ~"~ my email is yinghong81@yahoo.com
|
|
|
|
|
I see you have a Yahoo address, use it! Search Results for Cyber Cafe Management[^]
This kind of software is not free and noone is going to send it to you...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to save an image located on the clipboard to an IMAGE field in SQLServer without having to save to disk first.
When I run the code listed under CASE1 everything works file.
When I run the code listed under CASE2 I get a "invalid parameter used" error.
Windows does not recognize this as an image file when the stream is saved to file after retrieving from the database.
Does anybody have a solution why the FileStream works and the MemoryStream doesn't?
Tim
Dim oImgObj As Image = oDataObject.GetData(DataFormats.Bitmap, True)
'CASE1
oImgObj.Save("c:\Test.bmp", Imaging.ImageFormat.Bmp)
Dim fs As New FileStream("c:\Test.bmp", FileMode.OpenOrCreate, FileAccess.Read)
Dim bImageFile(fs.Length - 1) As Byte
fs.Read(bImageFile, 0, fs.Length)
fs.Close()
'CASE2
Dim ms As New MemoryStream
oImgObj.Save(ms, Imaging.ImageFormat.Bmp)
Dim bImageMemory(ms.Length - 1) As Byte
ms.Read(bImageMemory, 0, ms.Length)
ms.Close()
|
|
|
|
|
I'm a newbie to vb.net (and c# for that matter) but I've been tasked with writing a config app for an educational tool. The app should have a sophisticated gui for configuring hierarchical lists of commands, e.g in the form a of a tree structure. I'll probably need DB access and eventually have to talk to some kind of bluetooth device. I've got pretty extensive experience with visual c++, but that was a few years ago.
My simple question is: what are the main considerations when deciding between coding in vb versus C#? In other words, what are the main limitations/advantages in using vb relative to c#?
thanks
ckk
|
|
|
|
|
They are basically the same. If you come from the C++ background C# may be easier for you, though.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
In the world of .NET, where all the managed languages compile down to just about the exact same IL, there is no difference. Well, there are some things that C# can do that VB can't and a few that VB can that C# can't, but those are language differences. There are really no differences when it comes down to what kind of app you can and cannot code in either language. This minor "gap" will become much smaller in with the forthcoming release of VS.NET 2005 and the .NET Framework 2.0.
It's really a matter of personal preference...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am writing a custom grid, inherited from datagrid. I use data-binding to populate grid from an ArrayList.
When I click the column header, I am capturing the click and sorting the arraylist and re assign the data source to populate grid with sorted data.
My problem is, I do not get the sort arrow in the column header. How can get this?
Thanks in advance.
- TOJO
|
|
|
|
|
There is no icon that is drawn for you automatically when sorting. You can't do it in a DataGrid. Although in a ListView controls Details view, you can. You have to draw it yourself using owner drawn header controls. There are a couple of articles here on CP (though searching for them is nearly impossible right now.) I've seen this done and have done it myself in ListView controls, but never a DataGrid. This will be possible to do in the next release of VS.NET 2005 and the .NET Framework 2.0.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well, if I set the allow sorting property to true and click on the header column to sort, the datagrid shows the up/down arrow by default. This works fine if my data source is a DataTable. Problem comes when I use an ArrayList as the data source. Any more thoughts on this?
TOJO
|
|
|
|
|
No. I never used an array as a source for a DataGrid.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello,
i am using a checkbox in a template column in datagrid.
The problem is that when i wan to get its value, i.e. checked is true of false.
after postback : it always give me, checked, if it is chchked by default.
and
false always, when it's not checked.
don't know y is this so ?
it's standalone, i.e. not linked with any database field.
plz help me in this.
here is the code sample:
if (e.CommandName == "Delete")
{
String Result = "";
foreach(DataGridItem dataGridItem in DataGrid1.Items)
{
//Get Checked property of Checkbox control
bool IsGraduate = ((CheckBox)dataGridItem.FindControl("CheckBox1")).Checked;
if (IsGraduate)
{
Result += "Is Graduate , ";
}
else
{
Result += "Is not Graduate , ";
}
Label1.Text = Result;
}
}
Looking for help.
what am i missing ?
Asim
Regards,
Asim
|
|
|
|
|
ASP.NET questions are better handled in the ASP.NET Forum, regardless of the language the code is written in.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am working on the office Com Addin.
Is there any way to get print preview and convert to jpeg file?
Shin
|
|
|
|
|
I wrote a small program for work, that contains a timer, and a clock. The idea of this program, was to control the work bells. I hard coded the times for the bell to ring and attached a control for the printer (LPT1) port. My problem is that over the course of the day, the timer funtion seems to fail. By this i mean that what should be a timer for 10000 works fine at the start of the day, but by the time it makes it to the 5th pre-programmed time, the timer seems to act like it was programmed for 1000000. Any ideas on how to fix this.
|
|
|
|
|
There are no issues with the timer controls with a problem like this.
Are you using VB6 or VB.NET?
If VB.NET, how is your app written? As a Service or Windows Forms app?
Are you using the Windows.Forms.Timer or System.Timer?
How is your code setting up and using the Timer? Code snippets help alot!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is there any sample code in VB6 to trigger a snap shot of s digital camera, using WIA2.0?
PL
|
|
|
|
|
The only examples I've seen for VB6 are here[^] on MSDN, in the documentation for WIA Automation 2.0.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
When I called the TakePicture function, it returned "not implemented". Why?
PL
|
|
|
|
|
Probably because the driver for your camera doesn't support it. It most likely only supports downloading the pictures from the camera, and managing the file system and some settings of the camera. That's it.
Come to think of it...I don't know of any digital cameras that will take a picture when connected and talking to a PC. It's either COMM mode or one of the picture modes, not both...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm writing a program that needs to access a computer's Midi functionality programmatically. Sort of like this:
Private Function PlayNote(iPitch as Interger, iDuration as integer) as Boolean<br />
<br />
'access MIDI here<br />
...<br />
<br />
End Function
Can someone point me in the right direction? All I've found so far is how to access Midi through C++ wrapper classes.
"Go to, I’ll no more on’t; it hath made me mad." - Hamlet
|
|
|
|
|
Dave I'm sure you'll be the one responding so I'll direct towards you, and by the way , I think I can say on behalf of all of us here, you are a great help.
I had asked you a question a while back, about printing with forsay the printdocument to a file. Well going the other route of creating the tif image file myself.
My problem, is I can create a tiff image file, and it'll open on my home computer, but at work, when I try to open it, or pass it our Biscom Fax Software, it says incorrect format, which I'm sure it's cause it's not compressed right. If you could guide me in the right direction, or tell me what I'm doing wrong, Here as follows is my code
Dim b As Bitmap = New Bitmap(800, 1100)
Dim g As Graphics = Graphics.FromImage(b)
g.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
g.DrawString(myuser.username, New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 240, 20)
g.DrawString(myuser.outsidephone, New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 250, 37)
g.DrawString(myuser.email, New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 185, 53)
g.DrawString(" Name : " + TextBox2.Text, New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 50, 130)
customerinfo = Customerfind(TextBox1.Text)
g.DrawString("Company : " + customerinfo.Company, New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 50, 150)
g.DrawString(" Phone : " + TextBox3.Text, New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 50, 170)
g.DrawString(" Fax : " + TextBox4.Text, New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 50, 190)
g.DrawString("Active Part", New Font("Arial", 30, FontStyle.Bold), Brushes.Black, 280, 260)
Dim mypos As Integer = 315
Dim index As Integer
Dim total As Integer
total = ListView1.Items.Count
For index = 0 To total - 1
g.DrawString("Part # : ", New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 80, mypos)
g.DrawString(ListView1.Items(index).Text, New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 150, mypos)
mypos += 20
g.DrawString("Description : ", New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 50, mypos)
g.DrawString(ListView1.Items(index).SubItems(1).Text, New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 150, mypos)
mypos += 20
g.DrawString("Price : ", New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 80, mypos)
g.DrawString(ListView1.Items(index).SubItems(2).Text, New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 150, mypos)
mypos += 20
g.DrawString("Cubes : ", New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 80, mypos)
g.DrawString(ListView1.Items(index).SubItems(3).Text, New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 150, mypos)
mypos += 40
Next
Dim blackpen As New Pen(Color.Black, 3)
g.DrawRectangle(blackpen, 30, 240, 760, 180 + (mypos - 400))
mypos += 100
g.DrawString("Notes", New Font("Arial", 14, FontStyle.Bold), Brushes.Black, 60, mypos)
g.DrawString(TextBox9.Text, New Font("Arial", 12, FontStyle.Regular), Brushes.Black, 60, mypos + 25)
g.Save()
Dim mysave As String = install + "\Active\" + TextBox2.Text + "-" + Today.Month.ToString + "-" + Today.Day.ToString + "-" + Today.Year.ToString + ".tif"
b.Save(mysave, Imaging.ImageFormat.Tiff)
g.Dispose()
b.Dispose()
|
|
|
|
|
Well, I only have about 10 minutes per day (if I'm lucky!) to do this anymore. My life got very busy with a new job and my girlfriend recovering from reconstructive knee surgery.
First, you don't use g.Save() . This doesn't save the image, only the state of the Graphics container. In your case, it's useless...
Second, I'd have to do some research on this, but it would appear that at least one of the image parameters being written to the .TIFF file are wrong or not supported by the Fax software .TIFF parser. What I mean is something like the Image Color Depth or Pixel Format may not be supported.
I say this because your creating a Bitmap object using just the height and width parameters, which defaults to a 32-bits per pixel format that supports 8 bits for Red, Green, Blue, and an Alpha channel.
Now, when you go to save the Bitmap object, that image information is stored with the image in the .TIFF file. But, I don't think the correct, or should I say universaly compatible, image parameter information is being written to the file. Fax software might only support an 8-bit per pixel or maybe even a 1-bit per pixel format. So...
What I think you have to do is experiment with creating your Bitmap object using the Height, Width, and PixelFormat parameters. Something like:
Dim b As Bitmap = New Bitmap(800, 1100, PixelFormat.Format1bppIndexed)
You might also have to alter the Palette array and supply the correct colors to the Bitmap object if the PixelFormat is an -Indexed format. In the case of Format1bppIndex, you'd have to supply 2 colors (32-bit ARGB values) to the Palette array, maybe 0x00000000 and 0xFFFFFFFF for black and white colors.
A good way to find out the information you need would be to load a .TIFF file generated by the Fax software into the Bitmap object and look at its property values in the debugger.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Glad you get to spend the time you do, helping others. Someday, I'll be able to answer questions,
I did some testing on some of what ya gave me,
the following throws an error
Dim b As Bitmap = New Bitmap(800, 1100, Imaging.PixelFormat.Format1bppIndexed)
Dim g As Graphics = Graphics.FromImage(b)
This throws the following error
Additional information: A Graphics object cannot be created from an image that has an indexed pixel format.
Tomorrow I'll grab a image that works, and see what specs I can get.
|
|
|
|
|
I'm trying to mimic the RowHeaderClick event whenever a row is click in a DataGrid. Does anybody know how to do it? Basically I just want to highlight the entire row. Also, is there a way to change either the font color or background color of different rows in a DataGrid?
|
|
|
|
|