|
|
send me ur code
Rajendran.AL
|
|
|
|
|
Go,
Sub One() - called onLoad
Dim colVOLEndereco As Collection
colVOLEndereco = objBLLEndereco.fnListar
If colVOLEndereco.Count > 0 Then
lstEnderecos.DataSource = colVOLEndereco
lstEnderecos.DataTextField = "pstrNome"
lstEnderecos.DataValueField = "pstrIDEndereco"
lstEnderecos.DataBind()
end if
End Sub
Sub Two() - Called on postback
Dim colVOLEndereco As Collection
colVOLEndereco = lstEnderecos.SelectedItem
End sub
In sub two, the object selected isn't got. I'd like to put the selected object in colVOLEndereco.
OK?
|
|
|
|
|
Is "Sub One()" called during every page load?
You probably only want to call "Sub One()" only on the initial page load, or when the collection has changed.
Have faith in yourself; amateurs built the Ark, professionals built the Titanic.
|
|
|
|
|
call sub one() function in page_load
Rajendran.AL
|
|
|
|
|
Trying to use multiple textbox's to filter gridview
Ex. Age[ ] To [ ] St. [ ] Zip [ ] City [ ]
I can get one textbox to work but not several or even 2
|
|
|
|
|
How are you "filtering" your gridview? Are you passing parameters to a sql query? Or are you trying to use the dataview filter? Try posting your code if you need help.
I didn't get any requirements for the signature
|
|
|
|
|
do you mean people enter search criteria into the search box and that filters the gridview depending on their criteria?
We are not a Code Charity
|
|
|
|
|
yes that's what I'm after
|
|
|
|
|
Just use a select query to populate the grid.
Then in the textbox allow a user to enter criteria then select everything that matches that.
Put the select query on the row create event therefore everytime the gridview is created it checks the query
We are not a Code Charity
|
|
|
|
|
can you show me an example??
|
|
|
|
|
start here and then come back once you have populated the gridview and have some textbox searches created unless you already have...
http://www.15seconds.com/issue/060323.htm
We are not a Code Charity
|
|
|
|
|
Hi,
I am filling the dropdown using javascript. I have given the selected index also. But after any server event the filled values are gone. What could be the reason.
Thanks.
|
|
|
|
|
The reason is that asp.net uses something called ViewState[^].
If you modify the html on the client via javascrit, that html is gone when the page posts back to the server.
I didn't get any requirements for the signature
|
|
|
|
|
Hi,
Thanks for your reply. Please tell me the solution.
Thanks.
|
|
|
|
|
If you are using .net 2.0 or higher. I suggest using AJAX and writing server code to populate the drop down.
Do you understand why it is that if you populate a dropdown with javascript you're going to have to re-populate that list after every postback?
I didn't get any requirements for the signature
|
|
|
|
|
newOpt = document.createElement("OPTION");
newOpt = new Option(nodval,nodval);
libox.options.add(newOpt);
try this..
Rajendran.AL
|
|
|
|
|
Hi,
Thanks. I have used that option only. But still after the postback the filled items gone.
|
|
|
|
|
send me your code
Rajendran.AL
|
|
|
|
|
var ddlVendor = window.opener.document.getElementById(gId);
//Clears the combo box contents.
for (var count = ddlVendor.options.length-1; count >-1; count--)
{
ddlVendor.options[count] = null;
}
var vendorNodes = listNode.getElementsByTagName('Table1/Name');
var vendorIds = listNode.getElementsByTagName('Table1/Id');
var textValue;
var idValue;
var optionItem;
//Add new vendors list to the vendors combo box.
for (var count = 0; count < vendorNodes.length; count++)
{
textValue = GetInnerText(vendorNodes[count]);
idValue = GetInnerText(vendorIds[count]);
var newOption = window.opener.document.createElement('OPTION');
newOption.text = textValue;
newOption.value = idValue;
ddlVendor.options.add(newOption);
}
ddlVendor.selectedIndex = count-1;
|
|
|
|
|
check the for loop....length and count condition..
Rajendran.AL
|
|
|
|
|
Mahesh.J wrote: any server event
The server event resurrects the values from a statebag called ViewState. You ought to rebind your JavaScript dropdown again.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
I have a Sub Routine as below:
Private Sub SaveRecord()
Call InsertIntoTable1
Call InsertIntoTable2
Call InsertIntoTable3
Call InsertIntoTable4
End Sub
I want to use the transaction object in such a way that it starts just before the first Insert Call and ends after the last Insert Call. The situation is that I have to save records in each table using different procedures.
Presently, if suppose records are successfully inserted in First and Second Tables and if insertion fails in Third Table then the entries done in First and Second Table must rollback.
How it can be done?
kissy
|
|
|
|
|
|
So, I just listened to podcast #6 from stackoverflow.com and I was amazed when Joel Spolsky described how he structures his own ASP.NET applications. Not that there's anything wrong with it but it was just very different than how I do it.
He said that usually he has few pages and then a big switch that switches on verbs in the request address. The various case statements then makes a user control visible which then handles the actual action.
Personally I just like to have many very small pages with small responsibilities (obviously I´m mainly talking about actual web applications and not web sites) since I like it clean and lean.
Anyway this made me curious as how different people structure their ASP.NET apps. So how do you do it?
"When you have made evil the means of survival, do not expect men to remain good. Do not expect them to stay moral and lose their lives for the purpose of becoming the fodder of the immoral. Do not expect them to produce, when production is punished and looting rewarded. Do not ask, `Who is destroying the world?' You are."
-Atlas Shrugged, Ayn Rand
|
|
|
|