
mr relaxo
Avatar/Signature-
Posts
53 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by mr relaxo
-
That will return the index of the selected item which I dont think is what your looking for. use dropdownlist3.selectedvalue to get the underlying value of the listitem or dropdownlist3.selecteditem.text to get the actual text seen by the user. Also if selectedindex is returning 0 you probably dont have code like If Not Page.IsPostBack Then ' insert call to function/sub that loads your page here End If in your page_load event.
-
hi everyone, im trying to create what seems like a pretty straightfoward little app. I basically want the user to be able to select text from listboxes etc from a form and then insert the text at the desired location in a word 2000 document. im using docvariables in the document and i have the following code Public Class Xdocument Shared wordapp As Word.ApplicationClass Shared worddoc As Word.Document Shared wordrange As Word.Range Shared wordbk As Word.Bookmark Shared wordpara As Word.Paragraph Shared fld As Word.Field Shared dv As Word.Variable Shared Function addsometext(ByVal text As String) As Boolean Try wordapp = New Word.ApplicationClass wordapp.Documents.Open("e:\vb\testdoc.doc") 'wordrange = wordapp.ActiveDocument.Range For Each fld In wordapp.ActiveDocument.Fields If fld.Type = Word.WdFieldType.wdFieldDocVariable Then 'if variables name is "something" then '"insert some text here" End If Next i can find the docvariables ok, what i cant figure out is how to access the docvariables properties via the field object. is some sort of cast required or what? I may be totally headed in the wrong direction here so please feel free to point me in the right one. Thanks, Kris.
-
for web graphics, macromedia fireworks is pretty standard and easy to use. I do a mock page layout in it with all the menus/graphics, then export what i need as html/javascript. then just cut and paste the code fireworks generates into a user control. its quick and gives you more time to concentrate on the programming aspect. you can do more complex things in photoshop but the learning curve is a bit steeper, not to mention the pricetag.
-
do you mean something like this?? String myvalue; foreach(ListItem li in ListBox1.Items) { if(li.Selected == true) { myvalue = li.text; } }
-
you'll need to study up on .NET role-based security.
-
Use the html <strike> tag.
-
you could buy the book "windows xp hacks", theres a few performance tweaks in there. Though you're probably better saving your money and buying a better processor or more RAM. I find tweaks or apps that claim to "speed up windows" invariably provide no noticable performance increase and can stop things working properly anyways.
-
you write an sql statement that attempts to retrieve a record matching the users input. e.g Dim strSQL As String = "select * from customers where CustomerCode = '" & (loginnamevariable) & "'" & _ "and password = '" & (passwordvariable) & "' ;" fill a dataset with the result. if the rowcount of the table in the dataset is 1 you've got a match so let them in otherwise kick them out.
-
Investigate the PagedDataSource class.
-
thanks!
-
I have an sql statement as a string like this: "Select sizeid, CONCAT (sizeid, " / ", description) as merge from sizes order by sizeid" I cant figure out how to get the " / " part to be taken literally. Can someone help me out? Thanks, Kris.
-
it can be done with javascript. look here http://www.dynamicdrive.com/dynamicindex16/disableenter.htm
-
Hi everybody, I have a website job coming up, the client wants to sell some merchandise online. I dont think they'll sell enough to warrant real-time processing so im basically wondering what the generally accepted practises for handling credit card are? I know you need a SSL certificate to establish a secure connection between client and server, but then what? Should you write the information to a database? email it to the processing department? Im basically just a bit nervous/confused about it and was hoping somebody could give me some advice on the best way to go about securing the information and transmitting it to the appropriate place. Thanks alot, Kris.
-
http://www.homestarrunner.com
-
Glad it worked. sorry my c# was a bit wrong but im sure you worked it out :D What I meant to say... Request.UserHostAddress ; Request.ServerVariables["remote_addr"];
-
Request.UserHostAddress(); or Request.ServerVariables("Remote_addr"); this might be of use to you also
-
Have you considered using the asp:repeater control instead? It seems like it would meet your requirements i.e dynamically create html tables based on a database query and make it alot easier to obtain the properties of the controls. This would also keep alot of presentation logic out of your code. Just a thought, best of luck Kris.
-
hi, http://samples.gotdotnet.com/quickstart/howto/ plenty of examples there. and also connection strings
-
Probably because you're returning a count of records in your database table rather than the records themselves which is what you want. the line ds.tables("tablename").rows.count will tell you how many records were returned, so make the sql statement "select * from ..... where...."
-
'create a dataset dim ds as new dataset dim con as new OleDbConnection("your connection string") dim da as new OleDbAdapter("select * from table", con) try da.fill(ds,"datatablename") return true catch e as exception return false end try if ds.tables("datatablename").rows.count = 0 then err.text = "no matching records" end if the best thing to do with this type of operation is make it reusable by sticking it in a function and passing the sql statement, dataset and possibly a data table name as parameters, that way you can use it to fill any dataset you want.
-
You can also read data from excel in a very similar fashion to the way you read from a database. The only requirements are that your spreadsheet has named range(s) you use the jet provider the connection string includes the following line "Extended Properties=Excel 8.0;" then you can use an sql statement like "select * from yournamedrange" and fill a dataset or whatever. Also you can use column names e.g if you use row 1 of the spreadsheet to name the columns you can use those names in your sql statement.
-
maybe ive missed something(wouldn't be the first time!), but if the function you want to call is called UpdateToolbar then you would call it with UpdateToolbar() without an object reference. also, every time the user loads a different page the user controls page_load event fires. so just set your label text then.
-
this article may be helpful to you with regard to dynamically creating controls.
-
drop down lists dont have a "value" property. try: if myRegionList.selecteditem.text ="noRegion"