|
.netman wrote: i < departments.SelectedItem.Selected
Its wrong, the 'Selected' property returns a boolean value.
As CG said you can use Foreach to loop throught all selected items,
OR a for loop to loop through all items and find selected items.
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
hi
i want to add validation in my application.
i have code
if (Convert.ToBoolean(txtLogin.MaxLength = 10))
{
TIPL.MsgBox.Show("Max length is 10");
}
but i want this code on keypress event.
then how to use this event.
Gayatri
|
|
|
|
|
onkeypress is the JS event. Hook your event handler to this event. Put your code into a JS function and hook it with onkeypress event. Something like
YourTextBox.Attributes.Add("onkeypress","YourJsFunction();")
|
|
|
|
|
Hi Everyone,
Im writing connection in web config while user logged in.after writing sucessfully its a message showing as 'The file has been modified by the outside of the source editor. do you want to reload it.' do you want to reload. this makes stucks my application flow. is it possible to avoid that reloading the webconfig and the changes should be affect in the web config. is it possible. im using the folling code to write.
Dim AppPath As String = Server.MapPath("~/web.config")
Dim index As Integer = AppPath.LastIndexOf("\")
If index > 0 Then
AppPath = AppPath.Substring(0, index)
End If
Dim WebConfigFile As String = AppPath + "\web.config"
' MessageBox.Show(WebConfigFile);
If File.Exists(WebConfigFile) Then
Dim xmlDoc As New XmlDocument()
xmlDoc.Load(WebConfigFile)
Dim xmlNodelst As XmlNodeList = xmlDoc.GetElementsByTagName("connectionStrings")
Dim xmlNode As XmlNode
If xmlNodelst.Count > 0 Then
For cnt As Integer = 0 To xmlNodelst.Item(0).ChildNodes.Count - 1
xmlNode = xmlNodelst.Item(0).ChildNodes(cnt)
If xmlNode.Attributes.Count = 2 Then
If xmlNode.Attributes.Item(0).Value = "SRPCONNECTIONSTRING" Then
xmlNode.Attributes.Item(1).Value = "database=SRPnew;uid=srp;pwd=12345;server=kag;Connect Timeout=150;"
End If
End If
Next
End If
xmlDoc.Save(WebConfigFile)
End If
rgrds
Kanna
|
|
|
|
|
Dotnetkanna wrote: 'The file has been modified by the outside of the source editor. do you want to reload it.'
You have web.config file opened in the editor and it is asking confirmation to reload when the file changes. It's not ASP.NET issue, this is how VS editor works.
I don't recommend writing to web.config at runtime. When web.config file changes, application has to recycle and it will destroy current sessions. I'd use a separate configuration file other than web.config if connection strings are being updated on runtime.
|
|
|
|
|
hai friends
i written a javascript code in a page
and to call it i used the code
Page.ClientScript.RegisterStartupScript(Me.GetType(), "close", "tranRightt('upload');", True)
its working in my localhost
but when i uplaod the page into website it is not working
plz help me
thanks in advance
vijay
|
|
|
|
|
What does 'not working' mean ? Your question header shows wrong thinking, if you inject script in the page, it will attempt to run. I would assume the issue is that the js file containing tranRightt is not loading properly due to issues in how you include it, and your folder structure when you deploy.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Adding to what CG said: install firebug which is an extension for firefox and debug your JS.
|
|
|
|
|
Yeah, I usually remember to say that, that's excellent advice. Firebug rocks.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Christian Graus wrote: Firebug rocks.
Yes. It rocks. But I am worried, it's showing some weird behavior in FF3.
|
|
|
|
|
hello frnds,
how can i get version of PDF file using asp.Net
any help ???? hint ???
thankx in advnace
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
You mean you want to find out what version a PDF file is using .net?
We are not a Code Charity
|
|
|
|
|
in RadioButtonList
how to get Text and Value of ListItem
when we check any one using java script function
rbtnHeader is ID of RadioButtonList
var s = document.getElementById('<%=rbtnHeader.ClientID%>').value;
value of s is undefined.
so how to do?
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
RadioButtonList is rendering as radio buttons with html table.
So you cal add an onclick event to the asp:ListItem Something like below.
<br />
<asp:listitem text="T1" value="V1" onclick="GetVal('rbtnHeader_0');" ></asp:listitem><br />
<asp:listitem text="T2" value="V3" onclick="GetVal('rbtnHeader_1');" ></asp:listitem><br />
and the js is
<br />
function GetVal(cntrl)<br />
{<br />
var x=document.getElementById(cntrl);<br />
alert(x.value)<br />
}<br />
I dont know how good this is.But It will work.
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
how to change the cursor color when focus textbox Or readonly textbox or enabled false textbox
lav naphade
|
|
|
|
|
How to Solved Excel formula through vb.net,have any book which have all formula solution step by step for example LINEST and any other other formula. Please help me.
Thanks
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
You could ask it better in some other forum.
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
This is not an ASP.NET question. You CAN control Excel in VB.NET, there's an SDK for that. Your users will need Office, of course.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
NO i do not want to use Excel control,i want library or dll which contain the all formula of Excel . For Example:- Statistics,finance,math math and etc
Its not only asp.net question i think Dll and lib.use in both.
i have gated one link but its contain only finance formula.
www.visualnumerics.com/products/imsl/jmsl/v40/api/com/imsl/finance/accrintmEx1.java - 2k[^]
Please Help me.
Thankue
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
OK - sorry but your wording was not clear.
Your best bet is to just research and write the code for the formulas you want to use, I would expect. It's just a little math.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Hi,
I have one html table, table contains rows and columns(cells). Now i want to do some animataion like Moving stripes of a cell.
How to do, or give me any suggestions to animate a cell dynamically using css or javascript or c#
Thanks and Regards
RakayaD
|
|
|
|
|
Animation is usually done using flash especially if you want the cells to move.
In my opionion it would be better not to use flash
We are not a Code Charity
|
|
|
|
|
Hi,
I am binding a data in a detail view at run time. But I also want to edit it at the run time. I have tried the following code.
Protected Sub Detailsview1_ItemUpdated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewUpdateEventArgs) Handles Detailsview1.ItemUpdating
Dim index As Integer = Generic_DG.SelectedIndex
Dim con As New SqlConnection(ConfigurationManager.AppSettings("connectionString"))
Dim cmd As New SqlCommand()
cmd.CommandText = "UPDATE Products SET ProdName=@ProdName where ProdId=@ProdId"
cmd.Connection = con
cmd.Connection.Open()
cmd.ExecuteNonQuery()
cmd.Connection.Close()
End Sub
How can I replace @ProdName with data in a detail view?
OR
Which property of the detailview I have to use for it?
Rock Star
modified on Friday, July 4, 2008 4:16 AM
|
|
|
|
|
Hi
Have a look at this
Details View[^]
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Hi,
I am planning to use dbprovider factory class and retrieving and binding the detailsview with the dataset at runtime. And now I want to edit the data in it. I am not using a data source. So how can I edit the data in a detail view now. So what code or property should I add in a detailsview to update the data in a detailsview.
Rock Star
|
|
|
|