|
Hi,
you can use the DirectoryInfo and FileInfo classes for this. Use for each statements to iterate through Files collection of DirectoryInfo class and also apply the same logic for each directory under the main directory.
This would definetly do the trick ( i think )
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
1. I'm looking for a way to detect from where the surfer is from.
I know google has such a thing and they can tell me from what country, region and even city I live in.
I know that in C# it something with colture.
How can I do it in ASP.NET?
2. I have an ASP.NET page, that opens a new ASP.NET page with a js cmd (window.open()).
How can I refresh the first page, when the second one closes? do I need to use a different cmd?
|
|
|
|
|
Hi,
NaNg15241 wrote: 1. I'm looking for a way to detect from where the surfer is from.
I know google has such a thing and they can tell me from what country, region and even city I live in.
You can easily get the IP of the "surfer". From this IP you can get the location of the client.
Try reading the link below. Here are some tips.
http://www.private.org.il/IP2geo.html
Hope i am clear
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
here my problem is i need to display records of next,previous.if i click previous it should show upto first record like that.
using datagrid and repeater or anything else
kissy
|
|
|
|
|
You need to store the data in the dataset and just have to navigate the recordset according to the navigation button clicks.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Dim ds As New DataSet
Dim cmddtr As SqlDataAdapter
Dim cmdselect As SqlCommand
//opening connection
cmddtr = New SqlDataAdapter("select * from Division where Divi_id=7", dbconn)
cmddtr.Fill(ds, "Division")
DG.DataSource = ds
DG.DataMember = "Division"
DG.DataBind()
dbconn.Close()
This will work for a all the records to be display,but my need is ,when i click on buttonnext,it should show one by one record in the datagrid.no need of at a time all the records display,but each time when i click next it should go for the next record.likewise previous.
kissy
|
|
|
|
|
If you want to use a datagrid then you can go for paging and there you can set the page size to 1. That way you will get the one record per page and then navigation links.
Best Regards,
Apurva Kaushal
|
|
|
|
|
i have this code placed on itemcommand of the datagrid..
<br />
If (e.Row.RowType <> DataControlRowType.Pager And e.Row.RowType <> DataControlRowType.Header) Then<br />
msClientCode = e.Row.Cells(1).Text<br />
msClientName = e.Row.Cells(2).Text<br />
msClientType = e.Row.Cells(3).Text<br />
End If<br />
how do i convert it to a gridview?
what should i use rowcommand or rowbound?
the code simply gets the selected item then puts the values of the fields into the variables..
anyone knew how to?
thanks..
|
|
|
|
|
anyways i figured it out.. i put this line of code in the rowcommand of thr gridview..
<br />
If (e.CommandName = "Select") Then<br />
Dim row As GridViewRow<br />
<br />
row = gvList.Rows(Convert.ToInt32(e.CommandArgument))<br />
<br />
msClientCode = row.Cells(1).Text<br />
msClientName = row.Cells(2).Text<br />
msClientType = row.Cells(3).Text<br />
<br />
End If<br />
|
|
|
|
|
Hi... Good day.
I have a question, in my page bottom part, it have 5 buttons with different function. One of the button is use for print. I use window.print() function for printing the page.
My question is, when i click the print button to print the page, i want all of the 5 buttons hide from the page and after i finish print the page or close the print window, i want those 5 buttons appear back in the page. Anyone have idea how to do this? Thanks...
Best Regards,
Pei Sun
|
|
|
|
|
Hi,
In the event handler for print button write code like this ---
button1.Visible = false
button2.Visible = false
button3.Visible = false
button4.Visible = false
// your printing code goes here
button1.Visible = true
button2.Visible = true
button3.Visible = true
button4.Visible = true
If you are using some panel or something like that to hold the buttons then you can iterate through the controls collection to set this property. It would be a better programming practice. You can also write a function for this, with 2 args, parent control ( like panel ) and child control to be set visible false. ( just an example )
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
|
Thanks for your reply. I'm not familiar with css. Can you explain further about the link uyou recommend me to read? I'm not so sure how it works. Thanks..
Best Regards,
Pei Sun
|
|
|
|
|
|
Hi Friends,
I want to add controls dynamically to the form at any position as i wish.For that i want to identify the location on the form(page).How to do it in asp.net 2.0 . I know that so many talented people are here to help us.Please post a better solution for this as soon as possible.
Thankyou to one and all,
Regds,
Hari.
|
|
|
|
|
Hi Friends,
This is HariBabu, I want to drag items from one listbox and drop it in another listbox. I want code for this fuctionality in asp.net with c#. i know so many talented guys are here to help me.
Thankyou Guys(Also Ladies)
Regds,
Hari.
HariBabu Kuricheti
|
|
|
|
|
|
Hi Naveed Kamboh,
Thanks for giving response and i saw the examples which you send to me ,it is some what helpful for me, but is there any perfect code for that type of functionality in webapplications(Asp.net 2.0 c#).If any Please send to me .
Anyway Thanks for your contribution.
Regds,
Hari.
|
|
|
|
|
I have a column which is an edit button in datagrid , i want it invisible when the page load , and when i press another click button, the edit button inside the datagrid become visible ? I need to code it in HTML more better ,not in code-behind, thanks you very much.
Best regards,
Chee ken
|
|
|
|
|
using property a column can be make invisible.
<asp:EditCommandColumn Visible="False" ButtonType="PushButton" UpdateText="Update" HeaderText="Edit" CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
=postmaster
www.programmingknowledge.com
-- modified at 23:43 Thursday 24th August, 2006
|
|
|
|
|
I Got it !!
Thanks..
Best regards,
Chee ken
|
|
|
|
|
Hello,
I am trying to add a javascript block to a page in runtime.
I am getting an error because I not setting the type but I don't know how to do it.
My code is:
Dim urchinTracker As String = "<script type='text/javascript'>" & _
"_uacct = 'UA-XXXXX';" & _
"urchinTracker();" & _
"</script>"
If (Not ClientScript.IsClientScriptBlockRegistered("UrchinTracker")) Then
Page.ClientScript.RegisterClientScriptBlock("UrchinTracker", urchinTracker) >> Problem is here
End If
Basically, I am adding the code for Google Analytics.
Thanks,
Miguel
|
|
|
|
|
You can choose a specific type such as the Page type to pass in to the method.
|
|
|
|
|
How do I set focus after a button is clicked to go directly into a textbox. Or even if its on load have the cursor right on the textbox automaticall
Thanks
|
|
|
|
|