|
DataGrid1.DataSource = null;
DataGrid1.DataBind();
|
|
|
|
|
frnd ur code hide the data, not deleting ,if i refresh the form again the old data also displaying.
|
|
|
|
|
What do you want to do ? Be more specific with question, show some sample code, how it will display again ?
|
|
|
|
|
I am having a string in format(KSERVER/Name)...Now i want only the Name,How can i split?....I dont want to use Substring method.
Thanks in Advance...
|
|
|
|
|
Split it with / , you will get a string array. From that you can take name easily
|
|
|
|
|
Dim arr() As String
Dim n As Int16
Dim str As String = "KSERVER/Name"
arr = Split(str, "/") 'using / split the sring
For n = 0 To UBound(arr)
MessageBox.Show(arr(n))
Next
i think this code will help u.
by srinivasan.s
|
|
|
|
|
Dim arr() As String
Dim n As Int16
Dim str As String = "KSERVER/Name"
arr = Split(str, "/") 'using / split the sring
For n = 0 To UBound(arr)
MessageBox.Show(arr(n))
Next
try this code....
Rajendran
|
|
|
|
|
Kasi Viswanathan wrote: I dont want to use Substring method.
Why not? That's the most efficient way of getting a part of a string.
Use the IndexOf method to get the location of the "/" character, then use Substring to get the part of the string after that:
string name = path.Substring(path.IndexOf('/') + 1);
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Tanx for ur reply...
|
|
|
|
|
My Requirement is to create a web application in which a TAB Control is placed in it.
In each tab same controls are to be placed. for this i created a webuser control and accessed the same in each tab.
I have placed some controls like radiobutton list, textboxes, dropdowns fro selection criteria in the web user control.
I have created a class and wrote some properties , serialize and deserialize methods to store the values selected from each tab and save to a disk file.
The question is that in one tab whatever i have selected and saved to the file it is coming in all tabs. I dont want this to happen.
it must come in one tab only, as i want to save different selection for different tabs.
So How can i do this?
Please help me out if u have any solutions by which this prob can be solved.
chandra
|
|
|
|
|
Hi I have declared static arraylist and its contained operations In Select Case (Url)...,
Now I like to display those based on table records...,
Plz any one help me how to fill that table records in this code...,
My Asp.Net code
Sub MenusLoad()
Dim _Text As ArrayList = New ArrayList
'Here From That Table MainDesc Have to Fill
_Text.Add("Admin")
_Text.Add("Gen.Master")
Dim ts As JQD.TabStrip = CType(Me.FindControl("TabStrip1"), JQD.TabStrip)
ts.TabText = _Text
'Here Based on that MainDesc, Link_Title Have to Fill
Dim _SubTabText As Hashtable = New Hashtable
_Text = New ArrayList
_Text.Add("User Rights-Group")
_Text.Add("User Rights-IND")
_SubTabText.Add(0, _Text)
_Text = New ArrayList
_Text.Add("Company")
_SubTabText.Add(1, _Text)
' Like This i am loding subtabs on here...,
ts.SubTabTextCol = _SubTabText
AddHandler ts.SelectionChanged, AddressOf Me.ts_SelectionChanged
End Sub
'Here based on that subtabs i am loding my url...,
Private Sub ts_SelectionChanged(ByVal sender As Object, ByVal e As JQD.TabStrip.SelectionChangedEventArgs)
Dim TabPos As Integer = e.TabPosition
Dim SubPos As Integer = e.SubTabPosition
Select Case (TabPos)
'Here Based On that MainDesc And Link_Title, Link_URL Have to Fill
Case 0
If (SubPos = 0) Then
src = "frmuserrights.aspx"
End If
If (SubPos = 1) Then
src = "frmAuthentication.aspx"
End If
Case 1
If (SubPos = 0) Then
src = "frmCompanyMasterDetails.aspx"
End If
End Select
Session("src") = src
End Sub
My Table:
SELECT dbo.tblAdminAuthenticationsub.userid, dbo.tblMainTab.MainId, dbo.tblMainTab.MainDesc,
dbo.tblAdminPageurl.Pageno, dbo.tblAdminPageurl.Link_Title, dbo.tblAdminPageurl.Link_URL
FROM dbo.tblAdminAuthenticationsub INNER JOIN dbo.tblAdminPageurl ON
dbo.tblAdminAuthenticationsub.pageno = dbo.tblAdminPageurl.Pageno INNER JOIN dbo.tblMainTab ON
dbo.tblAdminPageurl.MainId = dbo.tblMainTab.MainId WHERE dbo.tblAdminAuthenticationsub.userid = 10010053
order by dbo.tblMainTab.MainId
UserId MaiId MainDesc PageNo Link_Title Link_Url
10010053 1 Admin 102 Page Accumulation frmpageaccumulation.aspx
10010053 1 Admin 103 User Rights Old frmAuthentication.aspx
10010053 2 Gen.Master 152 Bank details of Company frmBankMasterForCompany.aspx
10010053 2 Gen.Master 153 Bank details of clients frmBankMasterForWorkOrder.aspx
10010053 3 HR 129 Activity Card frmtimecardmain.aspx
-- modified at 8:28 Monday 29th October, 2007
Regards,
Magi
|
|
|
|
|
Magh_M wrote: Re: Plz Help Me...,
Hey, you have posted more than 300 messages, and still don't you know how to name a question ? Make your question smaller by removing unwanted code, point the things that you need clarification. I don't think that without all these you will get a reply
|
|
|
|
|
Hi I have reduced my quest as small...
And I dont know more than this how to reduce it...,
If i reduce then no one cant whats the probs,
If my quest make u to anger sorry for that...,
Regards,
Magi
|
|
|
|
|
give small description of your problem. no one going to read this long code .
|
|
|
|
|
I am using a dropdownlist. DropDownList Enter the value in Design Time
(Add New).
My event in
dropdownlist_SelectedIndexChanged(---------)
{
if(dropdownlist.selectedindex == 0)
{
---------------
}
But Write this code not fired event()
|
|
|
|
|
Check property of dropdownlist that autopostback is true or not.
Devjit Das
|
|
|
|
|
Yes, AutoPostBack Property already True
|
|
|
|
|
in html OnSelectedIndexChanged="dropdownlist_SelectedIndexChanged" is written this function.plz to verify this.
|
|
|
|
|
Set the DropDown Property Autopostback is True
|
|
|
|
|
Yes, AutoPostBack Property Already Ture
|
|
|
|
|
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack ="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem >Slect</asp:ListItem>
<asp:ListItem >Hello</asp:ListItem>
<asp:ListItem >Hi</asp:ListItem>
<asp:ListItem >Are</asp:ListItem>
</asp:DropDownList>
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (DropDownList1.SelectedIndex == 1)
{
Response.Write("Testing");
}
}
|
|
|
|
|
May I know the code outside the "IF" condition is working or not??
or that dropdown contain any items???
You are using ASP.NET1.0 or 1.1??
if so check the InitializeComponent() in the code behind file that it contain an eventhandler for selectedindexchanged event....
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
--Here This code is according to the Question
if the Selected index is 2 than the code outside if is execute
-- I am user asp.net 2.0
|
|
|
|
|
put a break point on this point
if (DropDownList1.SelectedIndex == 1)<br />
check that, is it become true? and wat happend next
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|