ericstenson 5 Posting Whiz in Training Team Colleague

there are many different ways to do it. where is the date stored? SQL?

ericstenson 5 Posting Whiz in Training Team Colleague

hi- i am going through a similar thing right now. let me tell you what i did. i am not sure it solves your problem, but...

first, after the file is scanned, it is transferred to a document file server. let's call the computer \\DOCSERV.

\\DOCSERV is not directly connected to the internet, but is accessible to the webserver computer (let's call this computer WWWSERVER)

now, it wouldn't be good if people could just go to http://www.whatever.com/docs and see the docs.

so my website, after the user logs in (sql verified), docs available to the user are populated. these docs are transfered from the DOCSERVER to a temp directory on the webserver for the particular client the employee is working on. a process then starts on the webserver to kill those documents in 1 hr.

docs are named by a uniqueidentified plus a randomized number... highly unlikely it will be randomly found.

good luck.

ericstenson 5 Posting Whiz in Training Team Colleague

must love Google translations... maybe posting in the native language would make it easier to understand. (ok, that was a little mean.)

ericstenson 5 Posting Whiz in Training Team Colleague

I got it working just writing the GV over and over in each section. real pain in the rear. if anyone knows the solution, i am still interested, though....

ericstenson 5 Posting Whiz in Training Team Colleague

Hi- I have a doosie... I think. Maybe it's easy and I am just an idiot, I am not sure. Here's how it goes...

On my web form, I have a GridView.
I pull selected values from cells on the GridView.
Sometimes I change a dropdownlist.selected value, which causes the Gridview to refresh.
This all works fine.

Here is the trouble... as soon as I set the GridView.Visible = False
Poof! All is gone. It like unloads the control as if it doesn't exist anylonger on the form.

So, I was thinking, ok, whatever, i will just declare the GridView and populate it manually.
So normally i would do something like

Dim GridView1 as New Gridview

However, I want this GridView to be available to all the different subs.
Public GridView1 as GridView does not work... (not in a valid namespace).

Any thoughts or suggestions?

ericstenson 5 Posting Whiz in Training Team Colleague

negative. i love the new money. should be worth more. qed.

ericstenson 5 Posting Whiz in Training Team Colleague

i don't know... but does anyone else feel like the new colorful $20 bill should be worth more than the old $20 bill... or is it just me? (it could very well just be me... :) )

ericstenson 5 Posting Whiz in Training Team Colleague

is it a web application or a regular program?

if it is a regular program:

dim whatever as integer
whatever = form1.dropdownlist1.selectedvalue

if it is a web application, pass the value

on the first form:

Context.Items.Add("VAL", dropdownlist1.selectedvalue)
Server.Transfer("~/form2.aspx", True)

on the second form

dim whatever as integer
whatever = Context.Items("VAL")

ericstenson 5 Posting Whiz in Training Team Colleague

and i don't know how well a loop statement will help you out. a loop does something until it is "told" to end...

ericstenson 5 Posting Whiz in Training Team Colleague

please be more specific. "validate" in what sense?

ericstenson 5 Posting Whiz in Training Team Colleague

ok, give me some brownie points

ericstenson 5 Posting Whiz in Training Team Colleague

seriously... i leave VS projects open all the time when i am not working on them, just because i hate closing and re-opening them. even if i don't intend on coming back anytime soon, i often leave project open just by accident. you are better off creating a simple timer app... place simple "START PROJECT A" / "START PROJECT B" buttons on it

ericstenson 5 Posting Whiz in Training Team Colleague

I can't believe I just spent my time reading Page 1 of this thread. What a lame thread. :(

ericstenson 5 Posting Whiz in Training Team Colleague

background image:
~/imagefile.jpg

ericstenson 5 Posting Whiz in Training Team Colleague

You will need a server running IIS with the ASP.NET extensions. You can either go hosted or set one up yourself.

After that, build the site in VS to the /inetpub/wwwroot folder

Make sure ASP.NET version # is correct in the IIS Website properties and also make sure permissions are set properly.

Not really too hard...

ericstenson 5 Posting Whiz in Training Team Colleague
Dim webResponse3 As System.Net.HttpWebResponse = Nothing
        Dim webRequest3 As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://www.yahoo.com")
        Try
            webResponse3 = DirectCast(webRequest3.GetResponse(), System.Net.HttpWebResponse)
            Dim srResp As System.IO.StreamReader
            srResp = New System.IO.StreamReader(webResponse3.GetResponseStream())
dim SOMESTRING as string
            SOMESTRING = srResp.ReadToEnd
        Catch ex As Exception

        End Try
ericstenson 5 Posting Whiz in Training Team Colleague

Interesting...

ericstenson 5 Posting Whiz in Training Team Colleague

you are missing some '
every item must be wrapped in -- ' --

so like 'value','value2'

doesn't look like your textbox.text has ' on both ends.

hope that helps...

ericstenson 5 Posting Whiz in Training Team Colleague

From the TOOL menu at the top of the page select (Project Name) PROPERTIES. On that page you will see a drop down menu "Start Up form"... select the form you want the application to start with... in your case, the log-in form.

ericstenson 5 Posting Whiz in Training Team Colleague

which could happen if you are setting the value of a control with an autopastback - on setting.

ericstenson 5 Posting Whiz in Training Team Colleague

try an if notpostback = true then ... whatever code on pageload ... end if

maybe something in your code is causing it to reload?

ericstenson 5 Posting Whiz in Training Team Colleague

hi, i am not so sure i understand where the problem is coming in. i just quickly created an application which created 2 forms... form1 and form2. on form1 i created a checkbox and a button "Go to Form2", which makes form2 visible. From form 2, i created label1 and button1. when button1 is pressed it does an if statement...

If Form1.CheckBox1.Checked = True Then
Label1.Text = "1"
Else
Label1.Text = "0"

End If


it seems to display 100% fine based upon the check state of the checkbox...

where are you having trouble?

ericstenson 5 Posting Whiz in Training Team Colleague

Come on, man. Add a column "UserType" with a value of 0 or 1. 0 for admin, 1 for user. When you check the username and password, also grab the value from that column.

ericstenson 5 Posting Whiz in Training Team Colleague

Want to sub out the contract? Sound like you are in over your head. I see DW as a place where people can get help on specific nuances they need help with in code, not a place where the world can provide you with a solution that you get paid for. I must ask- why would you accept a project you have no idea how to solve?

ericstenson 5 Posting Whiz in Training Team Colleague

What about just creating the fade in a graphics program and setting the background image as a .jpg file or something?

ericstenson 5 Posting Whiz in Training Team Colleague

Hi, I can do it with a program... I have my programs do it all the time, to make sure "image links" i use on websites are valid, otherwise i fill in the image with a generic image. if you still need help, stenson1 at gmail dot com.

ericstenson 5 Posting Whiz in Training Team Colleague

so, without being mean, if you are a dummy, programming is not for you. i find personally, no matter where i am (on the train in the morning, out on the beach, etc. etc.), i am always running through 'what i want my program to do' and how 'i think i will make it happen' in my head. it's (somewhat) of a constant battle, but more like a really exciting challenge.

ericstenson 5 Posting Whiz in Training Team Colleague

if you want free books, try your local library. but rcadble is absolutely correct. i haven't read a single programming book. learn by doing-- it's the best way. you will find as you undertake projects there will be many things you don't know how to do. some you will figure out after many tries and error messages... finally, you will tweak your code so it works. other ideas you will get from places like this or code samples posted on the net. I find (and I don't know what the general feeling is about this) these posts are very helpful for "getting the right idea" on how to achieve a specific task, but individual creativity must ALWAYS supplement the lessons from others...

ericstenson 5 Posting Whiz in Training Team Colleague

there are plenty of free converters online. i think there might also be one from MSFT.

ericstenson 5 Posting Whiz in Training Team Colleague

I have a customer with a small accounting/invoice software program (order pro). Not very fancy at all. At any rate, the software stores all of the invoice data in one ".XDB" file. Anyone have any idea what type of database this could be? It seems like the application is an older application. Can't open the file with a text editor.

ericstenson 5 Posting Whiz in Training Team Colleague

Hi- Does anyone have any good code to watermark an image in vb.net? I guess this would be effectively the same as overlaying a 2nd image on top of an existing image.

Thanks,
Eric

ericstenson 5 Posting Whiz in Training Team Colleague

what is the pricing structure?

ericstenson 5 Posting Whiz in Training Team Colleague

You need to write an INSERT statement... INSERT into TableName (Column1, ...ColX) VALUES ('TextBox1.text' & "','" & TextBox2.text & "','" ... & TextBoxX.text & "'")

If you need help creating the connection to the database, email me at stenson1 at gmail

ericstenson 5 Posting Whiz in Training Team Colleague

Can you post the exact error you are getting? When it breaks on IE it should show you something along the lines of DOMAIN\IIS_USER is not authorized to access the file.

You need to make sure on the network resource/folder you are trying to access, the user specified on the exception has access. Try granting "Everyone" full control to the folder.

Is the machine on the same domain? Is there even a domain, or is it just a workgroup?

Have you tried impersonating a different user? (Just google it)

ericstenson 5 Posting Whiz in Training Team Colleague

Vb.NET is the only code I write...

ericstenson 5 Posting Whiz in Training Team Colleague

Hi- You have this posted in ASP.NET, so I am assuming it is a web application.

Let's simplify this a little, because obviously the permissions are giving you some trouble.

I would suggest an easy work-around. Map a network drive to the folder. Let's say the Z: drive. (Right click on the folder in Windows Explorer and click 'Map Network Drive'.)

Try writing a file from the server to the folder using the credentials specified in IIS. If it works, you are in business. YOU MAY NEED TO ADD THE IIS USER TO THE FOLDER.

The change \\machine with Z:\.

Hope it help.

stenson1 at gmail

ericstenson 5 Posting Whiz in Training Team Colleague

Aaron, what exactly are you trying to do? Do you want to retrieve the HTML code from a webpage and check to see if a particular string is within the code?

ericstenson 5 Posting Whiz in Training Team Colleague

Up to you, but you would be AMAZED at the abilities of Microsoft SQL... 4 sites probably isn't that taxing. Some shared hosting providers have (literally) hundreds of SQL databases serving hundreds of sites...

ericstenson 5 Posting Whiz in Training Team Colleague

Hi, I have found the best way to pass user information between pages is with Server.Transfer("~/page.aspx", true)

what you do is first create the string you want to pass between pages

ON SOME MOUSE CLICK OR EVENT:

dim isvalidated as string
dim username as string
isvalidated = "Yes"
username = "eric"

context.items.add("isvalid", isvalidated)
context.items.add("usern", username)
server.transfer("~/page.aspx", true)

---

once it goes to the new page you can "retrieve" these values

dim isvalid as string
dim usern as string


ON PAGELOAD FOR NEXT PAGE
isvalid = context.items("isvalid")
usern = context.items("usern")

what i usually do is validate at this point...

if isvalid = "" then
server.transfer("~/notauthorized.aspx")
else

DO WHATEVER YOU WANT

...

end if

ericstenson 5 Posting Whiz in Training Team Colleague

add after .cells(cell#).text.tostring

ericstenson 5 Posting Whiz in Training Team Colleague

dim string1 as string

string1 = gridview1.rows(row#).cells(cell#).tostring

now, here is the kicker. the first row is row "0"
the first column/cell is "0"

it goes against intuition of using 1...

if you still need help estenson1 at gmail

best,
eric

ericstenson 5 Posting Whiz in Training Team Colleague

Form has 1 textbox called TextBox1 and 1 button called button1


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim len1 As Integer
Dim str1 As String
str1 = TextBox1.Text
len1 = str1.Length
len1 = len1 - 1 'this is because the substring starts with index 0 instead of 1
Dim totalv As Integer

Do While len1 >= 0
totalv = totalv + Val(str1.Substring(len1, 1))
len1 = len1 - 1
Loop

TextBox1.Text = totalv


End Sub

ericstenson 5 Posting Whiz in Training Team Colleague

what you need to do is first determine the length of the string.

so let's say your string name is STRING1

dim LENstring1 as integer
LENstring1 = string1.length

next, create a variable to hold your total
also create a position valirable

dim STotal as integer
dim POS as integer = 0

now, create a loop to read your string

do while LenString1 >= 0
STotal = Stotal + val(String1.substring(POS,1)
POS = POS + 1
LenString1 = LenString1 - 1
loop

Something like that should do it. It might need to be tweaked a little.