|
yes...you can create a struct or an object that contain these 2 values...then put it into session
<< >>
|
|
|
|
|
I really don't know what's wrong with my dropdownlist,they can't display the values in the control.Have connected my application in to the database and entered the values into the fields,please check my code and tell me what might be the problem
**********
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack = False Then
LoadClientSite()
End If
End Sub
*******
Private Sub LoadClientSite()
Dim ds As New Data.DataSet
Dim objdata As Businesslayer.ClientSite = New Businesslayer.ClientSite
ds = objdata.GetUsers
cmbClientSite.DataSource = ds
cmbClientSite.DataBind()
cmbClientSite.Items.Add(New ListItem("Select Client Site", ""))
cmbClientSite.Items.Item(cmbClientSite.Items.Count - 1).Selected = True
End Sub
*******
My class
Public Function GetClientSite() As Data.DataSet
Dim strSQL As String
Dim obj As Datalayer.Database = New Datalayer.Database
strSQL = "Select Client_id,Client_site from ClientSite(nolock) "
GetClientSite = obj.GetDataSet(strSQL)
obj.Close()
Exit Function
End Function
**********
CONTROL-PROPERTY
DataTextField=ClientSite
DataValueFielld_ClientSite_Id
Ola m
|
|
|
|
|
please see your code...
ds = objdata.GetUsers
are you calling the write function??? I think its a silly mistake...
Live life to the fullest
|
|
|
|
|
can you please tell me what might be the problem ,because when i try to run it,it shows that there is a problem with that statement....
Thank you in advance
oga m
|
|
|
|
|
Oga M wrote: ds = objdata.GetUsers
You are calling function GetUsers... but you have function called as 'GetClientSite()'
Oga M wrote: Public Function GetClientSite() As Data.DataSet
Which is correct ??? Atleast both function name should be same.
Harini
|
|
|
|
|
when u are buiding at run time and u have assigned property to control that's problem.
CONTROL-PROPERTY
DataTextField=ClientSite
DataValueFielld_ClientSite_Id
it's wrong,
u have to bind your drop down as per below.
cmbClientSite.DataSource = ds
cmbClientSite.DataTextField="ClientSite"
cmbClientSite.DataValueField ="ClientSite_Id"
cmbClientSite.DataBind()
cmbClientSite.Items.Add(New ListItem("Select Client Site", ""))
cmbClientSite.Items.Item(cmbClientSite.Items.Count - 1).Selected = True
it will work..
Thanks,
Sun Rays
|
|
|
|
|
try this code it is working.
this is on the form:
Public Sub Pop_Type()
Dim NURDAtaset As New DataSet
Try
Call GetCommandObject1("Pop_Type")
Dim NURAda As New SqlDataAdapter(cmd)
NURAda.Fill(NURDAtaset)
If NURDAtaset.Tables(0).Rows.Count <> 0 Then
For Each row As DataRow In NURDAtaset.Tables(0).Rows
CmbType.Items.Add(row("TypeName").ToString)
Next
End If
Catch ex As Exception
Finally
NURDAtaset.Dispose()
NURCon.close()
cmd.Dispose()
End Try
End Sub
This is in common class:
Public Function GetCommandObject1(ByVal strQuery As String) As SqlCommand
Try
cmd = New SqlCommand
cmd.Connection = SharedCon.Siteconnection
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = strQuery
Return cmd
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Function
if there is some confusion then ask.
Mohinder Singh
|
|
|
|
|
I want to use a dropdownlist server control with a datagrid server control sothat when i change the dropdownlist the grid changes but using AJAX. I can do it if the datagrid is a simple html table but i can't implement it if the grid is a server control datagrid. Is there anyway to display the grid as a server control using AJAX or it must be html table to display it with AJAX?
Ahmed
|
|
|
|
|
Hi All,
I need to have some clarifications regarding a web project in ASP.net. I need to design a project for a form called project information form(PIF). Th constraint on that being I should be using a treeview to navigate to different screens(subsections in the form). I am dynamically creating a treeview from database values, because some of the screens need to be reused across subtrees. for example, there is building information in treenodes and the subnodes of those treenodes have area information. The area information forms(aspx pages) are similar for each building. so i am just calling the same form for each area, and planning to store the values filled in using the building and area id session variables. Q1)is there a better way to save this info? because the form(PIF) is huge and might need DAYS to be filled completely. I know that I might have problems with my session expire. but then I cannot provide a save button in each aspx page.. (thr are more than a 100 screens with data to be filled in)and the amount of data is also huge for session variables..Do i create a temporary table in the backend itself to store the data before the complete form is filled? so that when the final release is done I can save it to the master Database. In that case where can I trigger an auto-save? and since it is a tree, the navigation could be from any node to any other node, meaning they can fill the forms randomly. I am confused with where to trigger a save event automatically.
Any help.. thanks in advance
Please let me know abt any other designs where this problem couls be overcome
Regards
Vineeth
|
|
|
|
|
Hi,
Is any know how to add element to tree view or update elements to treeview using Client Call back concept.
Is any know how to add element to tree view or update elements to treeview using javascript.
kamalnath
|
|
|
|
|
Here are a few ways
Very Basic method of adding new node
<br />
private void BuildMenu()<br />
{<br />
<br />
tview.Nodes.Add("Item1");<br />
tview.Nodes.Add("Item2");<br />
tview.Nodes.Add("Item3");<br />
tview.Nodes.Add("Item4");<br />
<br />
}<br />
Slighty more complex
<br />
private void BuildMenuNodes()<br />
{<br />
AddNewNode("Item1", tview);<br />
AddNewNode("Item2", tview);<br />
AddNewNode("Item3", tview);<br />
AddNewNode("Item3", tview);<br />
<br />
}<br />
Even More Complex way
<br />
<br />
private void AddNestedNodes()<br />
{<br />
TreeNode node;<br />
<br />
node = tviewExplorer.Nodes.Add("Security");<br />
node.Nodes.Add("Item1");<br />
node.Nodes.Add("Item2");<br />
node.Nodes.Add("Item3");<br />
<br />
node = tviewExplorer.Nodes.Add("Item1");<br />
node.Nodes.Add("Item A");<br />
node.Nodes.Add("Item B");<br />
node.Nodes.Add("Item C");<br />
<br />
}<br />
// This is the MS prefered method due to the performance gains
<br />
<br />
private void AddNodesRange()<br />
{<br />
TreeNode[] nodes = new TreeNode[3];<br />
<br />
nodes[0] = new TreeNode(""ItemA");<br />
<br />
nodes[0].Nodes.Add("Item2");<br />
nodes[0].Nodes.Add("Item3");<br />
nodes[0].Nodes.Add("Item4");<br />
<br />
nodes[0] = new TreeNode(""ItemB");<br />
<br />
nodes[0].Nodes.Add("Item5");<br />
nodes[0].Nodes.Add("Item6");<br />
nodes[0].Nodes.Add("Item7");<br />
<br />
nodes[0] = new TreeNode(""ItemC");<br />
<br />
nodes[0].Nodes.Add("Item21");<br />
nodes[0].Nodes.Add("Item31");<br />
nodes[0].Nodes.Add("Item41");<br />
<br />
<br />
tviewExplorer.Nodes.AddRange(nodes);<br />
<br />
<br />
}<br />
Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture)
http:\\www.frankkerrigan.com
|
|
|
|
|
HI,
I am having Treeview in my application.i want to get HTML code for Tree view programatically .can ant body help me.
kamalnath
|
|
|
|
|
Hi,
I want some instructions in converting existing C# Windows Application to C# Web Application..
Please post your replies as soon as possible.
|
|
|
|
|
Please do not cross post...
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
If the application has been properly architected it should just be a matter of rewriting the presentation (UI) layer - perhaps with the odd addition elsewhere to support a stateless model of working. If it hasn't been well architected then you are looking at rewriting the whole application.
|
|
|
|
|
Spamming different 10 forums with the same question is very rude and totally unnecessary.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
UI needs to undergo a change.
|
|
|
|
|
Hello, I posted an earlier question about missing codebehind files, which I have since had answered.
I have an Aspnet 1.x website with .aspx and .dll files on the server; the codebehind files are not on the server, and the previous developer has neglected to leave any source code behind.
I have used Lutz Roeder's Reflector program to decompile the .dll, and now I can see all the juicy codebehind for each of the pages of the website.
My question now is this:
I want to make some minor changes to validation code. Can I take all the VB code reconstructed by Reflector, pour it into a new Codebehind page with the changes I want to make, and recompile just that page?
This seems pretty straitforward, but I want to be sure I am not about to find a pitfall. Will I need to reconstruct all the VB codebehind pages for the whole site for it to recompile, or is one page ok?
Thanks!
|
|
|
|
|
if u are having .aspx file same name as codebehind files as u are having from .dll then u can do it in this way. open application then click on .aspx page to view codebehind if it's coming blank then just copy paste all code for .vb file in this file. and then just compile it. done.
u can do it with one page only also.
Thanks,
Sun Rays
|
|
|
|
|
Thanks very much for your reply!
Yes that sounds pretty much what I need to do -- the app works, so the old code behind has all been compiled into .dll and works. I just wanted to be sure that if I reconstruct just one codebehind file as you say, and recompile, the app won't need all the other 30 codebehinds reconstructed as well.
Thanks again!
|
|
|
|
|
i have created a simple activex control.
it loads successfuly on the aspx page. it displays its user interface as created. ( one text box and a command button )
following is the vb6 code for the activex control
Option Explicit
Dim displaytext_value As String
Private Sub Command1_Click()
Text1.Text = displaytext_value
End Sub
Public Property Get displaytext() As String
displaytext = displaytext_value
End Property
Public Property Let displaytext(ByVal vNewValue As String)
displaytext_value = vNewValue
End Property
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
displaytext_value = PropBag.ReadProperty("displaytext", "")
End Sub
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
PropBag.WriteProperty "displaytext", displaytext_value, ""
End Sub
-----------------------------------------
following is the aspx page code
<object style="Z-INDEX: 110; LEFT: 304px; WIDTH: 176px; POSITION: absolute; TOP: 296px; HEIGHT: 176px"
="" codebase="TestCtl.ocx" classid="clsid:4C86F415-A10F-4785-B7D0-549A37D20F08" viewastext="">
<param name="_ExtentX" value="4657" />
<param name="_ExtentY" value="4657" />
<param name="displaytext" value="this is a test control" />
-------------Now the Problem ----------------------------
this control is loaded in the page when its opened in the web browser.
But on click of the command button , value of displaytext property i.e.
"this is a test control" should be displayed in the textbox.
and that is Not Happening.
if i use this control in vb.net windows application. it works and value is displayed
Any Suggestions.
Thanks
Vishal Marya
|
|
|
|
|
Hi guys,
I am very glad to be here. I have a doubt.I have used
window.close(); in javacsript to close a web page. It works fine but it asks for a confirmation/ it displays a message box. But i don't want this message box to be poped up. Is there any way to exclude this message box?
Or can we close a webpage in any other way?
waiting for your valid reply...
thanks in advance
Sebastian
|
|
|
|
|
This is being asked for security reasons. You can avoid this by workarounds.
Before calling close(), get the window in a variable and close. HTH.
|
|
|
|
|
Thanks for your reply. I got the answer by placing
window.opener=self;
just before the close command.
once again Thanks
Sebastian
|
|
|
|
|
Assign some value to window.opener. That way IE would get to think that the window is created by you and it would obey the master without any demur.
|
|
|
|