|
Hi,
I have 3 tables: table1, table2 and table3.
Table 1 (table1ID, Name1)
Table 2 (table2ID, table1ID, Name2)
Table 3 (table3ID, table2ID, Name3)
I have 2 DropDownLists: ddltable1SEARCH and ddltable2SEARCH.
They are both databound with the fields table1.Name1 and table2.Name2 respectively.
I also have a Datagrid: table3grid.
It is databound with the field table3.Name3.
NOTE: Please keep in mind the table relationships. My point is:
I CANNOT directly perform a search using the first dropdown. DropDown2 relies on DropDown1. When DropDown1 changes, DropDown2 changes to display available entries. THEN, the search is directly done by using DropDown2 for the Datagrid.
I have already created the view for the tables.
Therefore, I would like to know which of the following VB statements is syntatically correct when I am passing the search values from the DropDowns to a SubRoutine:
obj.SearchSubRoutine(Me.ddltable2SEARCH.SelectedValue)
OR
obj.SearchSubRoutine(Me.ddltable1SEARCH.SelectedValue And Me.ddltable2SEARCH.SelectedValue)
|
|
|
|
|
As per the Table Relationships, Table3 refers only Table2 and Table2 refers Table1.
And you are refreshing the ddltable2SEARCH list whenever ddltable1SEARCH selection changes.
So, you don't need to consider both dropdown values to fill the datagrid.
I would prefer : obj.SearchSubRoutine(Me.ddltable2SEARCH.SelectedValue)
Ravi Gopal.
|
|
|
|
|
Thanks for the reply, I will try to see if I can make that work. Have been trying for a while with no effect.
Cheers.
|
|
|
|
|
Hi All,
How can i mask a particular javascript function when an event occurs.
That particular javascript function should work well for all other events.
|
|
|
|
|
How to change the List Item of Dropdown list via coding.
For Examle I have list item Enable, How will I change that to disable via Coding from an event handler
|
|
|
|
|
If you are just having one item in the dropdown list the you can clear it and then add the new item. Otherwise you have to rebind the dropdown list with the new datasource.
Best Regards,
Apurva Kaushal
|
|
|
|
|
is there a way to have a server automatically
send out an email on a certain date. For example, if it was someones birthday,
an email saying happy birthday would automatically be sent out.
Using : ASP.Net
Dileep.M
|
|
|
|
|
Write a simple aspx page that will send a email to all users that have a birthday (based on current date).
And then set-up a shcedulle task that will run your script every day.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi
I think you must use Windows Service for this task. You must questioning DB by timer. And the end you receive simple "Scheduled".
|
|
|
|
|
How can I get click event in TextField...
Thanks
Kamal
|
|
|
|
|
What do u mean by click event .
If u want that event on on text change then
<asp:textbox id="TextBox1" runat="server" ontextchanged="EventName">
|
|
|
|
|
Use can use onfocus event. on key up ,keydown,keypressed etc.
Dileep.M
|
|
|
|
|
Hi
For textbox only we have onfocus,Keypress and textchanged events
No click event for textbox.
Thanks
monika
|
|
|
|
|
write below code in page init section
Private Sub Page_Init(........)
Me.TextBox1.Attributes.Add("onClick", "alert('Hello')")
i suggest you to check other threads also. it may help a lot. This question is solved by Parwej Ahmed yesterday.
Regards,
DJ Rock
|
|
|
|
|
hi there....
This is the code defaultly i'm having in sample.aspx file..[ html view ],
<%@ Page language="c#" Codebehind="sample.aspx.cs" AutoEventWireup="false" Inherits="Demo.sample" %>
I converted this sample.aspx.cs file into sample.dll file successfully. Now how should i write(include) the page directory in sample.aspx file, and what are the steps to upload this sample.dll file in remote server..
Please Help me...
Regards n Thks
Sam.M
|
|
|
|
|
The page directive shouldn't need to change - when you compile the website, all the code is placed into dll's, this should then function fine - all you need to upload are the .aspx files and the dlls in the bin folder.
|
|
|
|
|
I have an xml file. This xml file is used by multiuser. How to store changes made by multi user at the same time to no user lost their changes from xml file.
abc
|
|
|
|
|
To maintain multi user changes on a physical file, Open the file as below:
FileStream fs = File.Open("C:\\abc.xml", FileMode.Open, FileAccess.ReadWrite, FileShare.Read);
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(fs);
Now you can read and update the xmlDoc object. and when you are done, you can use the same FileStream object to write back your changes to the xml file.
As, we used FileAccess.ReadWrite we can read as well as write to the file.
And as we used FileShare.Read we give other users only Read permission until we close the conenction.
Ravi Gopal.
|
|
|
|
|
Thanks for reply. Do you think instead of locking file, We have to used xQuery to Insert, Navigate, Update and Delte xml data. Do you have any example for using xQuery or any link of article who use xQuery for above operation.
abc
|
|
|
|
|
Hai there,.....
Actually, i did coding for dropdownlist boxes loading (i.e : -) Three dropdown boxes i have[ country, state , Project]. If user select any country means, according to the user's selection, the State and Project should be loaded in the corresponding boxes. Without using page reloading, i finished successsfully by Javascript and AJAx....
But if i use JAvascript means, the selected value cannot be get at server side.. Only HTML dropdownlist i used.
If i use AJAX means, i can't able to convert that codebehind aspx.cs file into inline coding. Why i'm going to inline means , in remote server .cs file cannot be able to uploaded and that's y i trying in inline..... And also what pagedirectives i've to use at aspx file if i converted that aspx.cs file into dll file.............
Please help me sir....
Regards n Advance Thks
Sam.M
|
|
|
|
|
u can use the server control drop down list and add the attribute "onchange"
add this to page load or override page init
<br />
ddl.Attributes.Add("onchange", "JavascriptFunction(this);")<br />
before i knew AJAX i used to create arrays and write them to the html page when the page is loaded, they used to contain all the items, subitems, and sub-subitems and do the same functionality using javascript only
hope this would help but i didn't try it
Best Regards
3ala2
|
|
|
|
|
What about AJAX sir......Please help me....
Thks a lot
|
|
|
|
|
i donno man, i'm not AJAX expert
did u try to use the server control as i said above?
Best Regards
3ala2
|
|
|
|
|
I did everything in html dropdownlist boxes only, that's y i'm struggling........
Thks
|
|
|
|
|
Why do you need the .cs file on the server? There should be no need for this.
Have you looked at the Atlas framework that microsoft have been releasing - there's some good articles on this site about using callbacks.
|
|
|
|