15,902,445 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Naikniket (Top 44 by date)
Naikniket
28-Jul-19 1:27am
View
Yes you are correct, but here my question is quite different. I want to show user a customized message if the foreign key constraint fails. That means while deleting a record, if the reference of that record exists in secondary table a message saying you have <number_of> record in <secondary_table_name>, delete it first.
Naikniket
22-Jul-19 6:45am
View
I am using this query
select * from pages_mst u
left join user_page_rights_mst up on u.id = up.fk_page_id
left join users on up.fk_userId = users.id
Which gives me all pages with null values as said, but if i want to see for specific user
select * from pages_mst u
left join user_page_rights_mst up on u.id = up.fk_page_id
left join users on up.fk_userId = users.id where users.id=1
Then it only shows the pages that are in permission table. not nulled records
Naikniket
13-Jul-13 7:27am
View
can you provide me any link?
Naikniket
17-Jun-13 8:03am
View
I have solved the issue... Thanks...
Naikniket
5-Jun-13 21:50pm
View
i have tried to find program data/users program data directory in to (file system on target machine>add special folder) but i cant find any option for program data or users program data. How to achieve this? And also i am using Application.StartupPath ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\database name.accdb") to connect with databse. What changes will needed after doing this?
Naikniket
5-Apr-13 22:01pm
View
I want something like this...
there is entry on date field 4/6/2013
Now after 4 days i.e. on 8/6/2013 all the records having 4/6/2013 date will be removed autometically... This should be done automatically.. Lets say when the server time gets 12:00AM it should be happen automatically...
Naikniket
5-Apr-13 22:00pm
View
I want something like this...
there is entry on date field 4/6/2013
Now after 4 days i.e. on 8/6/2013 all the records having 4/6/2013 date will be removed autometically... This should be done automatically.. Lets say when the server time gets 12:00AM it should be happen automatically...
Naikniket
19-Dec-12 8:10am
View
i want to create webfilemanager which does not directly intracts with hdd but it intracts via databse...
Naikniket
9-Nov-12 11:04am
View
Can i have some hint or some code from that i can get info how it works...?
Naikniket
9-Nov-12 10:54am
View
ok i try to improve my question.
Naikniket
18-Jul-12 9:48am
View
not working... :( :(... i am trying for 3 days but i am not getting it... i need it very urgent... i tried it but same problem.. it downloads the file but not redirects on download page...
Naikniket
18-Jul-12 9:47am
View
i have tried it but in wain.. it's downloads my file but not opens download page...
Naikniket
18-Jul-12 9:07am
View
I have an image stored in Images folder and now i want to download image stored in images folder.
Naikniket
16-Jul-12 8:05am
View
aaahhhhhhhhhhhhhhh... i have done silly mistake... bdw it's working now... Thanks a lot... :)
Naikniket
16-Jul-12 0:42am
View
i have tried this also..
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/msword";
Response.AddHeader("Content-Disposition", "inline;filename=MyDoc.doc");
StringBuilder myBuilder = new StringBuilder();
myBuilder.Append("< html type='application/msword'>");
myBuilder.Append(Edit.Text);
myBuilder.Append("< /html>");
Response.Write(myBuilder);
Response.End();
Response.Flush();
it is giving me output like this...
< html type='application/msword'>Hi < /html>
Naikniket
16-Jul-12 0:25am
View
i have placed one more button in this application, named "save as word file". Now i have placed this code,
HttpContext.Current.Response.AddHeader("Content-Disposition", "inline;filename=document.doc");
StringBuilder strHTMLContent = new StringBuilder();
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.ContentType = "application/msword";
strHTMLContent.Append(Edit.text);//Edit.Text is the contents of the html editor
HttpContext.Current.Response.Write(strHTMLContent);
HttpContext.Current.Response.End();
HttpContext.Current.Response.Flush();
this is giving me contents with html code.
Naikniket
15-Jul-12 7:26am
View
when i download the word file it will download but if i write HI in bold fontes in editor, then in word file it will display as html code only as we write in html to make font bold...
Naikniket
15-Jul-12 7:24am
View
i have tried it, but not working... may be i am not able to understand it properly... can you please explain in detail...???
Naikniket
13-Jul-12 10:23am
View
i know spire is not free.. i am asking about 1st one..
Naikniket
13-Jul-12 10:21am
View
may be you think this is silly but i have to ask as in future i am going to upload on server.. is this api free???
Naikniket
3-Jul-12 1:13am
View
yup i have solved it.... it's just easy... :) :)
Response.Flush()
System.IO.File.Delete(fullPathFileName)
Response.[End]()
Naikniket
1-Jul-12 22:51pm
View
I tried it but, its not working in chrome... :(:(
Naikniket
14-May-12 21:39pm
View
i have soled it.. thank you 4 reply..
Naikniket
5-May-12 11:13am
View
yes i have
Naikniket
5-May-12 9:41am
View
What type of EULA you are asking for? i mean for every website or every provider have their own EULAs...
Naikniket
11-Mar-12 9:56am
View
no i don't tried it as i was attempting that task and got "request.url" method and it worked... :)
Naikniket
10-Mar-12 8:59am
View
request.url
Naikniket
10-Mar-12 8:59am
View
thnak you.. i have got it...
Naikniket
10-Mar-12 8:24am
View
ok thank you but how to store the address in variable/session from url? i dont have any idea how to get url from address bar...?
Naikniket
22-Nov-11 22:45pm
View
it's not working.. :(
Naikniket
22-Nov-11 22:42pm
View
nope
Naikniket
16-Nov-11 8:59am
View
it's not working... it generates error "file page not found"... n ya i have binded my gridview with filesystem, n i want to open file directly.. for example there is a picture in folder, and it is displying in gridview, so when i click on it or open button in gridview the picture should be open in new tab... :(
Naikniket
16-Nov-11 6:46am
View
it is not working in access.. :(
Naikniket
16-Nov-11 4:26am
View
Protected Sub TvFolders_SelectedNodeChanged(ByVal sender As Object, ByVal args As EventArgs) Handles tvFolders.SelectedNodeChanged
BindDirsContents(Me.tvFolders.SelectedNode, Me.gvFolderItems)
End Sub
'''
'''
'''
''' <param name="node"></param>
Private Shared Sub BindDirsContents(ByVal node As TreeNode, ByVal gridView As System.Web.UI.WebControls.GridView)
' bind the gridview to the datasource
Try
gridView.DataSource = New System.IO.DirectoryInfo(node.Value).GetFileSystemInfos()
gridView.DataBind()
Catch ex As Exception
End Try
End Sub
'''
'''
'''
''' <param name="path"></param>
''' <param name="treeNode"></param>
Private Shared Sub BindDirs(ByVal path As String, ByVal treeNode As TreeNode)
If Not String.IsNullOrEmpty(path) Then
For Each directoryPath As String In System.IO.Directory.GetDirectories(path)
Dim directory As New System.IO.DirectoryInfo(directoryPath)
Dim subNode As New TreeNode(directory.Name, directory.FullName)
treeNode.ChildNodes.Add(subNode)
' bind sub directories
BindDirs(directoryPath, subNode)
''Dim Files As System.IO.FileInfo() = directory.GetFiles()
''For FileCount As Integer = 0 To Files.Length - 1
'' treeNode.ChildNodes.Add(New TreeNode(Files(FileCount).Name))
''Next
' if the parent node is null, return this node
Next
End If
End Sub
Naikniket
16-Nov-11 4:24am
View
acctuly i have binded treeview with file system & with treeview i hv binded gridview... m posting my code below...
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Me.IsPostBack Then
Dim rootFolder As String = Me.Server.MapPath("~\")
' load the treeview based on the folder strucutre
Dim rootNode As New TreeNode("Root", rootFolder)
rootNode.Expanded = True
rootNode.[Select]()
' add the root node
Me.tvFolders.Nodes.Add(rootNode)
' bind sub directories to the treeview
BindDirs(rootFolder, rootNode)
' bind the gridview to the datasource using the root node
BindDirsContents(rootNode, Me.gvFolderItems)
End If
End Sub
'''
'''
'''
''' <param name="sender"></param>
''' <param name="args"></param>
Protected Sub GvFolderItems_RowDataBound(ByVal sender As Object, ByVal args As GridViewRowEventArgs)
If args.Row.RowType = DataControlRowType.DataRow Then
Dim item As System.IO.FileSystemInfo = DirectCast(args.Row.DataItem, System.IO.FileSystemInfo)
Dim imageButton As ImageButton = DirectCast(args.Row.FindControl("btnItemIcon"), ImageButton)
If TypeOf item Is System.IO.DirectoryInfo Then
imageButton.ImageUrl = "Images/folder.gif"
Else
imageButton.ImageUrl = "Images/File.gif"
Dim fileInfo As System.IO.FileInfo = DirectCast(item, System.IO.FileInfo)
Dim lblSize As Label = DirectCast(args.Row.FindControl("lblSize"), Label)
lblSize.Text = String.Format("{0:N0} KB", fileInfo.Length \ 1000)
End If
End If
End Sub
'''
'''
'''
''' <param name="sender"></param>
''' <param name="args"></param>
Protected Sub GvFolderItems_RowCommand(ByVal sender As Object, ByVal args As GridViewCommandEventArgs)
' handle either opening the item or rebinding the grid
If args.CommandName = "ItemClick" Then
Dim name As String = DirectCast(args.CommandArgument, String)
Dim dinfo As New System.IO.DirectoryInfo(Me.tvFolders.SelectedNode.Value)
If System.IO.File.Exists(System.IO.Path.Combine(dinfo.FullName, name)) Then
Dim fileInfo As New System.IO.FileInfo(System.IO.Path.Combine(dinfo.FullName, name))
' they clicked on a file, download it
' to there PC
Me.Response.Clear()
Me.Response.AddHeader("Content-Disposition", "attachment; filename=" & fileInfo.Name)
Me.Response.AddHeader("Content-Length", fileInfo.Length.ToString())
Me.Response.ContentType = "application/octet-stream"
Me.Response.WriteFile(fileInfo.FullName)
Me.Response.[End]()
Else
For Each node As TreeNode In Me.tvFolders.SelectedNode.ChildNodes
If node.Text = name Then
node.Selected = True
node.Expanded = False
' expand the parents
Dim parentNode As TreeNode = node.Parent
While parentNode IsNot Nothing
parentNode.Expanded = False
parentNode = parentNode.Parent
End While
' bind the gridview to the datasource
BindDirsContents(node, Me.gvFolderItems)
Exit For
End If
Next
End If
End If
End Sub
'''
'''
'''
''' <param name="sender"></param>
''' <param name="args"></param>
Protected Sub TvFolders_SelectedNodeChanged(ByVal
Naikniket
13-Nov-11 10:26am
View
i have solved dat with the help of 1st reply...
Naikniket
13-Nov-11 10:26am
View
i have solved dat with the help of 1st reply...
Naikniket
13-Nov-11 10:25am
View
Deleted
i have solved dat with the help of 1st reply...
Naikniket
10-Nov-11 10:39am
View
i want to delete system file, not database record...
Naikniket
10-Nov-11 10:39am
View
i want to delete system file, not database record...
Naikniket
7-Nov-11 6:25am
View
you have solved my prob.. thnx a lot..
Naikniket
5-Nov-11 9:22am
View
hy i have solved it...
Me.Page.ClientScript.RegisterClientScriptBlock(Me.[GetType](), "myUniqueKey", "self.parent.location='page1.aspx';", True)
Naikniket
5-Nov-11 9:19am
View
Thnx 4 repliyng, but it's not working, still it opens in frame...
Naikniket
5-Nov-11 1:26am
View
i know about this, but i want to load system folders in iframe, mot any perticular file... :( :( bdw, thnx 4 replyin...
Show More