What are you using? Webforms, WPF, Winforms, MVC?

Perhaps this code will help you, found at SharePoint Code Snippets by Sudarsan

Example- Get Full Url Of A SharePoint List

SPUtility.GetFullUrl(SPContext.Current.Site, listobj.DefaultDisplayFormUrl);

Example- Get Full Url Of A SharePoint ListItem

SPUtility.GetFullUrl(SPContext.Current.Site,"/"+ itemobj.Url);

What have you tried so far?

Hey folks. Great job on the new site!

Reporting a strange overlay issue on the Homepage in Chrome 19.0.1084.46 m on 64bit Windows 7.

There is a taller than normal header and a blank spot on the right sidebar that, on mouseover, displays an overlay on the screen. Like the login box overlay but without the login box... If that makes sense.

Clear cache, etc etc of course.


Just realized it was my Adblock extension. The "spots" were blank because of adblock, but the overlay still showed on mouseover. Not sure if you can put placeholder images where the ads go to make it a little more clear as to what is happening?

Any way, keep up the good work!

Ok, still not 100% sure what you are trying to accomplish, but I do know that the biggest issue is the way you are looping with the data reader.

I've taken your original code and converted to a datatable and it outputs the following in the richtextbox1:

[ICODE]Section: 32 Measurdate 7/20/2010 12:00:00 AM[/ICODE]

Here is the modified code with a datatable you can actually use to loop with:

[CODE]int[] fj1Sections = {1,35,33,32,20,19,17,16,18};
bool test = true;
string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=car_mos.accdb;Persist Security Info=False";
string queryString =
"SELECT dbo_SectionMeasure.[BakingFurnaceNo], dbo_SectionMeasure.[SectionNo], dbo_SectionMeasure.[MeasureDate], dbo_SectionMeasure.[IsLastValue] FROM dbo_SectionMeasure ORDER BY dbo_SectionMeasure.[MeasureDate] DESC;";
OleDbConnection connection = new OleDbConnection(connectionString);
OleDbCommand command = new OleDbCommand(queryString, connection);
DataTable dt = new DataTable();


                OleDbDataReader reader = command.ExecuteReader();

                for (int i = 0; i < fj1Sections.Count() ; i++)
                    for(int x=0;x<dt.Rows.Count;x++)
                        string section_no = dt.Rows[x][1].ToString();
                        if ((section_no == fj1Sections[i].ToString()))

                            richTextBox1.Text = "Section: " + fj1Sections[i].ToString() + "       Measurdate " + dt.Rows[x][2].ToString();

            catch (Exception ee)
                richTextBox1.Text = ee.ToString();


I'm sure there is a more efficient way to do this, but hopefully this gets you going!

[URL="http://www.dotnetcurry.com/ShowArticle.aspx?ID=143"]See more on the DataTable usage here[/URL]

OK, so let me get this straight:

If you have the following:

1 35 1/1/2009 true
1 35 1/1/2011 true
1 16 1/1/2009 true
1 16 1/1/2011 true

You want to get rows 1 and 3 correct? The oldest date for 35 and oldest date for 16, right?

Ok, I understand a bit more now after running your code.

You are looping over each of the number in your list AND looping through your records.

It's not working because the while(reader.read()) does not reset each loop. The .read() function is forward only. See [URL="http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbdatareader(v=vs.71).aspx"]this MSDN article on the class.[/URL]

I hope this helps. Try populating a dataset, then you can using it multiple times.

Why the for loop? The while loop goes through all the rows.

Not sure if I understand you right. Can you give me a few examples database rows and what outcome you want?

Given database rows:
[CODE]ID Num Date
1 34 1/16/2011
2 34 2/5/2011
3 13 5/5/2011[/CODE]

I'm assuming that when you Choose "34" in your dropdown, you want to get the oldest date, in this case, 1/16/2011.

Is that right? If so, my previous query does the trick. If not, we need to further refine.

Why don't you use a SQL Statement instead? If you only need one record (oldest date) then it isn't efficient to bring back all records from the database.

Amend your query to something,

[CODE]SELECT TOP 1 [fieldname], [etc...], FROM tablename WHERE [column2] = '' ORDER BY [datefield][/CODE]

That will give you one row with the oldest date where the column2 is equal to the value in your ComboBox.

Note: Highly recommended to use a parameterized query and not just concatenate the string, but this is just the sql example.

This reduces network traffic and greatly enhances your response time.

[QUOTE=ROBBIN CHISI;1633168]How can i use the data grid for in putting data in the database when you are using visual basic 6.0? Please help[/QUOTE]

Robbin, this thread is 5 years old. Please start a new thread.

PS: try giving more information too, like what you have already tried, what type of database, etc.


Hmm, off the top of my head, name is depreciated. What browser are you trying? Swap out "name" for "id".

Also, try
[CODE]onclick="return clearVillage();"[/CODE]

Some browsers, (IE usually), likes the return keyword at times.


Check to ensure the button isn't calling the function before the function is declared. (i.e. is the function declared in the tag?)

High quality like that is rarely free. Just sayin.

I would add Unity to the list of choices. I recently created my first basic game in Unity. It took me about 4 evenings to get it to beta status.

The biggest plus to unity is its multi-platform. 2nd is that you can do a lot of stuff by drag and drop. 3rd, it has a built in physics engine which REALLY helps when you are just learning.

My advice is do something very basic (like pong) in Unity or another game creator tool first. Then move on to C#, C++, Java, etc. Otherwise, as already said, you will find yourself quickly overwhelmed trying to do the most simple task.


Try setting a css class to that column and setting the css style "visibility:hidden;". This way asp can still access the data but the user won't see it.

If the data is confidential then your best bet is to pull the data from DB on post back and work with it there.

[QUOTE=Kraai;1538526]It will run on a vps type, you don't need dedicated, vps is ok, unfortunatly, not normal shared hosting.[/QUOTE]

Ah, thanks for that. I just found out he ordered shared hosting today so I'll try to run a solution on that. Might convince him to upgrade though, depending on expected volumes.

[QUOTE=Kraai;1538521]Why not just download shoutcast server and install on your friends server? That way you have the back bone to produce online radio, by using winamp to stream content to the shoutcast server, and listeners can tune in.

Will shoutcast run on a shared hosting environment? I was under the impression you needed a dedicated server to install it.

A friend of my recently asked me to help him set up a web based radio. Upon doing some research I found he has only original content (not copy right stuff), all static mp3 files, not live talk, and wants to loop the audio.

I've found sites like radionomy and some free shoutcast hosting sites but they all either inject ads into the audio or make you use a page covered in ads.

I got to thinking: In .NET/asp I can set the headers/mime type of my page as say pdf/excel file/zip file etc and the browser offers it as a download.

In PHP (his server only supports php) is it possible to set a file mime type as some sort of streaming file m3u or something? It would of course need to keep serving mp3s so when one finished another one would start.

Curious if anyone has some input on the subject matter!


[QUOTE=tet3828;1369916]Thanks for your help! I'm finding this example very useful and will attempt to apply it to my project.

I just want to make sure I have a proper understanding of the code;

The top half is declaring the class and variables. get and set are bassically assigning null values. The first line of the second block of code declares a list class. the " ... " represent where the loop mechanism would be. new ImageFile creates a new object and the remaining lines; (after the equal signs) assign the properties.[/QUOTE]

This simple project puts the pieces together for you. I commented pretty much every line to explain how things work.

Kimpl commented: Very helpfull for the op. +1

[QUOTE=tet3828;1369379]Is it possible to have these objects created dynamically?

Speaking in code "For each Jpeg in the directory > create an object > assign the object a unique name (imageFile + i++) > assign the file name/location > assign some more data"[/QUOTE]

Use this to iterate through files in a directory.

string MyDirectory = "C:\";
string MyString = "My Files: ";

string [] MyFiles = Directory.GetFiles( MyDirectory, "*.jpg", SearchOption.TopDirectoryOnly );

 foreach( string MyFile in MyFiles )
      MyString = MyString + MyFile + "; ";
      MessageBox.Show( MyString );

catch(Exception MyError){
MessageBox.Show("Error reading file: "+ MyError.Message);
from: [url]http://www.ehow.com/how_5160227_loop-getfiles-microsoft-visual-sharp.html#ixzz13ZiSh7Vz[/url]

The BindingNavigator doesn't seem to have a seek, find or search method. But, you can easily create a loop to find the record.

Without seeing code it's hard to give you examples, but something like:

Have your button pass a unique id identifying the record to a method.

The method starts at MoveFirstItem and checks the id for a match, using MoveNextItem until a match is found.

You could roll your own user control with [URL="http://msdn.microsoft.com/en-us/library/ms171926%28VS.80%29.aspx"]data binding capabilities[/URL].

Ah sorry, I was thinking ASP.NET.

There is a DataGridView in WinForms though. Under the Data Controls section in the toolbar.

Here try this: (sample VS 2010 project attached.)


            if(webBrowser1.EncryptionLevel != WebBrowserEncryptionLevel.Insecure)
                label1.BackColor = Color.Green;
                label1.BackColor = Color.White;


You'll need to check for mixed authentication mode as well but this should get you on the right track.

What objects are you using for web browsing? The built in .NET browser? Try pasting in the code where you are trying to accomplish this.

Oh, your writing a browser. That wasn't clear to me, Sorry.

Use something like:
HttpRequest request = application.Request;
if (request.IsSecureConnection)
//do something


Exactly. If you want that to "Turn Green" you need an SSL certificate installed. You need to purchase one and have it installed your web server.

I think the grid view and detail view should do this for you. Check those controls out.

You can use an option group for multiple choice answers. A module or project level variable will hold the score.

Give it your best shot and post your code if you have issues.

Where is it hosted? You usually have to order a Certificate from a provider like RapidSSL, GoDaddy, Geotrust, etc.

The process will involve a bit of back and forth from your hosting provider unless you manager your own server.

Some shared hosting accounts provide a free shared SSL, but that changes your URL from yourdomain.com to yourdomain.hostingdomain.com.

$50(ish) per year gets you a cert at GoDaddy.