Click here to Skip to main content
16,005,473 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionpayemnt gateway Pin
deepika18-Jan-09 19:37
deepika18-Jan-09 19:37 
AnswerRe: payemnt gateway Pin
Abhijit Jana8-Jan-09 20:06
professionalAbhijit Jana8-Jan-09 20:06 
QuestionException of type 'System.OutOfMemoryException' was thrown. Pin
www.Developerof.NET8-Jan-09 19:28
www.Developerof.NET8-Jan-09 19:28 
AnswerRe: Exception of type 'System.OutOfMemoryException' was thrown. Pin
Abhijit Jana8-Jan-09 19:44
professionalAbhijit Jana8-Jan-09 19:44 
GeneralRe: Exception of type 'System.OutOfMemoryException' was thrown. Pin
Member 260050931-Jan-10 22:55
Member 260050931-Jan-10 22:55 
QuestionAsp.net how to implement payment gateway i want credit card validation Pin
deepika18-Jan-09 19:22
deepika18-Jan-09 19:22 
AnswerRe: Asp.net how to implement payment gateway i want credit card validation Pin
Abhijit Jana8-Jan-09 20:08
professionalAbhijit Jana8-Jan-09 20:08 
Questionhow we can fatch java script function from dll in asp.net Pin
vikramsc8-Jan-09 19:21
vikramsc8-Jan-09 19:21 
AnswerRe: how we can fatch java script function from dll in asp.net Pin
Abhijit Jana8-Jan-09 20:42
professionalAbhijit Jana8-Jan-09 20:42 
GeneralRe: how we can fatch java script function from dll in asp.net Pin
vikramsc8-Jan-09 20:56
vikramsc8-Jan-09 20:56 
GeneralRe: how we can fatch java script function from dll in asp.net Pin
Abhijit Jana8-Jan-09 21:08
professionalAbhijit Jana8-Jan-09 21:08 
QuestionProblem with Validations Pin
sarang_k8-Jan-09 18:36
sarang_k8-Jan-09 18:36 
AnswerRe: Problem with Validations Pin
Sundar_R8-Jan-09 19:10
Sundar_R8-Jan-09 19:10 
QuestionHow to maintain state of treeview after post back? Pin
Ravi Munde8-Jan-09 18:30
Ravi Munde8-Jan-09 18:30 
AnswerRe: How to maintain state of treeview after post back? Pin
Sundar_R8-Jan-09 19:02
Sundar_R8-Jan-09 19:02 
GeneralRe: How to maintain state of treeview after post back? Pin
Ravi Munde8-Jan-09 22:00
Ravi Munde8-Jan-09 22:00 
QuestionHow to make Plugins in asp.net ? Pin
Piyush Vardhan Singh8-Jan-09 18:24
Piyush Vardhan Singh8-Jan-09 18:24 
AnswerRe: How to make Plugins in asp.net ? Pin
Abhijit Jana8-Jan-09 19:17
professionalAbhijit Jana8-Jan-09 19:17 
GeneralRe: How to make Plugins in asp.net ? Pin
Piyush Vardhan Singh8-Jan-09 19:42
Piyush Vardhan Singh8-Jan-09 19:42 
QuestionHi....drag and drop Pin
madancode8-Jan-09 18:02
madancode8-Jan-09 18:02 
QuestionProblem encrypt connection strings in web.config Pin
alyy04068-Jan-09 17:46
alyy04068-Jan-09 17:46 
Questionhow do I read a file name located in a specific folder into a C# app Pin
Tina P8-Jan-09 17:27
Tina P8-Jan-09 17:27 
AnswerRe: how do I read a file name located in a specific folder into a C# app Pin
Tina P8-Jan-09 18:12
Tina P8-Jan-09 18:12 
QuestionSet Listbox scroll position after Postback Pin
dsrao8-Jan-09 15:58
dsrao8-Jan-09 15:58 
Hi All,

I have a muti-select listbox on my web form. When you scroll down to select items and SelectIndexChanged event fires, the postback brings the listbox back to the top of the screen. The item is still selected, but you have to scroll down to see it. How do I get the listbox to show one of the currently selected items.

Below is the my code..
aspx page
]]>
<asp:panel id="PanelContent5" runat="server" skinid="cpanelcontent" width="99.7%" xmlns:asp="#unknown">
<asp:updatepanel id="updpanelComparisonHospital" runat="server" updatemode="Conditional">
<triggers><asp:asyncpostbacktrigger controlid="cmdCustomList">
<contenttemplate>
<asp:listbox id="cmdCustomList" runat="server" selectionmode="Multiple" height="70px">
AutoPostBack="true" Width="150px" OnSelectedIndexChanged="cmdCustomList_SelectedInde xChanged">




client script


fuction CustomSelect()
{

Var SMIndex = document.getElementById('ctl00_ContentPlaceHolder1 _cmdCustomList');
for(var index = 0; index < SMIndex.options.length; index++)
{
if (SMIndex.options[index].selected) {

SMIndex.options[index].selected = true;

}
}
}


Code behind


protected void cmdCustomList_SelectedIndexChanged(object sender, EventArgs e)

int cntSelected = 0;
string scriptBlock = "CustomSelect();";

try
{
if (cmdCustomList.SelectedIndex > -1)
{
for (int indx = 0; indx<cmdcustomlist.items.count;>{
if (cmdCustomList.Items[indx].Selected == true)
{
values = values + "," + cmdCustomList.Items[indx].Value;
cntSelected++;
}
}
Session["lstCompHosp"] = values;

if (chkComparisonExcludeOnly.Checked == false)
{
if (cntSelected == cmdCustomList.Items.Count)
scriptBlock = "cmdAllAvailHosp();" // Another Client side function
}

updpanelComparisonHospital.Update();
ScriptManager.RegisterStartupScript(this, typeof(DefaultView), "cmdCustom", scriptBlock, true);
}
}
catch (Exception ex)
{
throw new Exception(ex.Message, ex);
}

}

Would you please give some directions.

Thanks
Rao

Thanks & Regards
Rao

AnswerRe: Set Listbox scroll position after Postback Pin
Rajdev Ramasamy12-Jan-09 2:49
Rajdev Ramasamy12-Jan-09 2:49 

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.