Click here to Skip to main content
15,890,932 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Using SQL Search in c# page - problem with fields with ' ' in them Pin
SeMartens29-Jun-09 2:13
SeMartens29-Jun-09 2:13 
AnswerRe: Using SQL Search in c# page - problem with fields with ' ' in them Pin
Niladri_Biswas29-Jun-09 6:20
Niladri_Biswas29-Jun-09 6:20 
Questioncan't send mail with attachment file,that is from database Pin
pujafaldu29-Jun-09 0:39
pujafaldu29-Jun-09 0:39 
AnswerRe: can't send mail with attachment file,that is from database Pin
Manas Bhardwaj29-Jun-09 0:45
professionalManas Bhardwaj29-Jun-09 0:45 
GeneralRe: can't send mail with attachment file,that is from database Pin
pujafaldu29-Jun-09 1:27
pujafaldu29-Jun-09 1:27 
GeneralRe: can't send mail with attachment file,that is from database Pin
N a v a n e e t h29-Jun-09 1:37
N a v a n e e t h29-Jun-09 1:37 
AnswerRe: can't send mail with attachment file,that is from database Pin
N a v a n e e t h29-Jun-09 1:50
N a v a n e e t h29-Jun-09 1:50 
QuestionSomething Missing Pin
KhandelwalA29-Jun-09 0:30
KhandelwalA29-Jun-09 0:30 
I am using this code to generate Treeview dynamically from the database.....output is coming but...not as desired.....means Category's connected field are coming to Sub-Category1 and Sub-Category1's field are showing in Sub-Category2..........plz chk and let me know whether the loop is rite or not? code is:

Dim ParentNode As String(,) = New String(100, 2) {}
Dim count As Integer = 0
Dim db As Database = DatabaseFactory.CreateDatabase("See2Buy")
Dim cmd As String = "Select CategoryID, CategoryName From Cat ORDER BY CategoryID"
Dim rdr As IDataReader = db.ExecuteReader(CommandType.Text, cmd)
While rdr.Read()
ParentNode(count, 0) = rdr.GetValue(rdr.GetOrdinal("CategoryID")).ToString()
ParentNode(System.Math.Max(System.Threading.Interlocked.Increment(count), count - 1), 1) = rdr.GetValue(rdr.GetOrdinal("CategoryName")).ToString()
End While
'rdr.Close()
For [loop] As Integer = 0 To count - 1
Dim root As New TreeNode()
root.Text = ParentNode([loop], 1)
'root.Target = "_blank"
root.Value = ParentNode([loop], 1)
root.NavigateUrl = "SubCat1.aspx?id=" + root.Value
Dim cmd1 As String = " Select SubCat1ID, SubCategoryName from SubCat1 where CategoryID =" & ParentNode([loop], 0)
'Dim Module_Sdr As SqlDataReader = Module_SqlCmd.ExecuteReader()
Dim rdr1 As IDataReader = db.ExecuteReader(CommandType.Text, cmd1)
While rdr1.Read()
Dim child As New TreeNode()
child.Text = rdr1.GetValue(rdr1.GetOrdinal("SubCategoryName")).ToString()
root.ChildNodes.Add(child)
Dim cmd2 As String = " Select SubCat2ID, SubCategoryName from SubCat2 where CategoryID =" & ParentNode([loop], 0)
Dim rdr2 As IDataReader = db.ExecuteReader(CommandType.Text, cmd2)
While rdr2.Read
Dim child2 As New TreeNode()
child2.Text = rdr2.GetValue(rdr2.GetOrdinal("SubCategoryName")).ToString()
child2.Target = "_blank"
child2.NavigateUrl = "Default.aspx"
child.ChildNodes.Add(child2)
End While
End While
rdr1.Close()
TreeView1.Nodes.Add(root)
TreeView1.CollapseAll()
Next
AnswerRe: Something Missing Pin
Christian Graus29-Jun-09 0:38
protectorChristian Graus29-Jun-09 0:38 
AnswerRe: Something Missing Pin
Manas Bhardwaj29-Jun-09 0:40
professionalManas Bhardwaj29-Jun-09 0:40 
GeneralRe: Something Missing Pin
KhandelwalA29-Jun-09 0:44
KhandelwalA29-Jun-09 0:44 
AnswerRe: Something Missing Pin
Muhammad Gouda29-Jun-09 3:10
Muhammad Gouda29-Jun-09 3:10 
QuestionSys.WebForms.PageRequestManagerServerErrorException: Pin
krishnaveer28-Jun-09 23:57
krishnaveer28-Jun-09 23:57 
AnswerRe: Sys.WebForms.PageRequestManagerServerErrorException: Pin
Ravi Mori29-Jun-09 0:13
Ravi Mori29-Jun-09 0:13 
GeneralRe: Sys.WebForms.PageRequestManagerServerErrorException: Pin
krishnaveer29-Jun-09 0:39
krishnaveer29-Jun-09 0:39 
QuestionHow to persist the focus on the panel during postback Pin
YazhiniP28-Jun-09 23:43
YazhiniP28-Jun-09 23:43 
AnswerRe: How to persist the focus on the panel during postback Pin
Christian Graus28-Jun-09 23:49
protectorChristian Graus28-Jun-09 23:49 
QuestionHow to deal with Fileupload control inside View control ? Pin
Rameez Raja28-Jun-09 23:42
Rameez Raja28-Jun-09 23:42 
AnswerRe: How to deal with Fileupload control inside View control ? Pin
Christian Graus28-Jun-09 23:50
protectorChristian Graus28-Jun-09 23:50 
GeneralRe: How to deal with Fileupload control inside View control ? Pin
Rameez Raja29-Jun-09 0:34
Rameez Raja29-Jun-09 0:34 
GeneralRe: How to deal with Fileupload control inside View control ? Pin
Christian Graus29-Jun-09 0:40
protectorChristian Graus29-Jun-09 0:40 
GeneralRe: How to deal with Fileupload control inside View control ? Pin
Rameez Raja29-Jun-09 1:14
Rameez Raja29-Jun-09 1:14 
GeneralRe: How to deal with Fileupload control inside View control ? Pin
Christian Graus29-Jun-09 10:28
protectorChristian Graus29-Jun-09 10:28 
QuestionLaunching as aspx page from a user control(ascx) with parameters Pin
tiran_kaskas28-Jun-09 22:27
tiran_kaskas28-Jun-09 22:27 
AnswerRe: Launching as aspx page from a user control(ascx) with parameters Pin
Manas Bhardwaj28-Jun-09 22:58
professionalManas Bhardwaj28-Jun-09 22:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.