|
you can do it like:
//hide
document.getElementById("TextBox1").style.display = "none";
//show
document.getElementById("TextBox1").style.display = "block";
/**--------------------**/
I am learning english.I am still having a few problem, but I getting better. I am very glad if you point my mistake in english.
TIA.
|
|
|
|
|
I need to export html tables into xls format in multisheets.
There are four html table on web page. All convert into one .xls file but in different sheets.
Mustakim Mansuri
|
|
|
|
|
Hai all,
Here i am getting a problem with the session variables i am using in my application.
I have one initialization form in which i am initializing 5 different values and storing in 5 different session variables.
In global.aspx page i am initializing the session state by assigning blank values in it,same in session_end.
Here my problem is,
if initialize the application,and keep it idle for some time like around 1Hour,it is giving ,u need to initialize againg.
The session getting expired.I have set the timeout in web.config for 1hr,but still it is expiring before 1hr.
Wat shd i do to rectify this problem.
Plz any one can give me some idea.
Thanks in advance
kissy
|
|
|
|
|
So your web.config looks like this:
<configuration>
<system.web>
<sessionState
mode="InProc"
timeout="60" />
</system.web>
</configuration>
??
What are you setting the session values to blank? I would think in the session_end event you would set them to null so the memory would be freed. There is no reason to initialize them to blank. In your code check to see if the session varable is null or Nothing if you are using VB.net
Ben
|
|
|
|
|
no i m using an analysing services which is dropping my all sesion variables,i m writing nothing in global application class.
|
|
|
|
|
Hi!
i want ....... when i press enter on a textbox cursor move to next textbox help me with code...
|
|
|
|
|
fmlove wrote: when i press enter on a textbox cursor move to next textbox
Ascii value for enter key is 13. You need to write OnKeyDown javascript event for your textbox and call function. Check event.KeyCode is 13, if yes use controlname.focus() to set focus to other textbox.
|
|
|
|
|
How can we write an excel file by using asp.net
it have 7 columns.. Help me please
Sarith...
|
|
|
|
|
use StreamWriter and just save your file a excel file
dim dtData as new DataTable
dtData.Columns.Add("Column1")
dtData.Columns.Add("Column2")
dtData.Columns.Add("Column3")
dtData.Columns.Add("Column4")
dtData.Columns.Add("Column5")
dtData.Columns.Add("Column6")
dtData.Columns.Add("Column7")
Dim fInfo As FileInfo
fInfo = New FileInfo("C:\test.xls")
Dim sw as System.IO.StreamWriter("C:\test.xls")
Dim sepator as string = "\t"
Dim intColumnCount as integer = dtData.Columns.Count
for i as integer = 0 to intColumnCount -1
sw.write(dtData.Columns(i).ColumnName)
if i < intCount-1 then
sw.write(sepator)
end if
next
sw.Close()
i hope this helps
Motivation alone is not enough, if you have an idiot and you motivate him/her, you now have a motivated idiot
|
|
|
|
|
Hi all
I am Trying To edit a datagrid
I am using this code
http://msconline.maconstate.edu/Tutorials/ASPNET1/default.htm[^]
But iam getting this Error
"Object reference not set to an instance of an object"
"ItemNumber = CType(Args.Item.FindControl("ItemNumber"), TextBox).Text
"
Can any one tell what wrong on my code
THAN Q
|
|
|
|
|
Your core problem is that you're using code blindly without understanding what it does. What this does, is it looks for a control, and it assumes it will find it. As such, this is bad code.
The 'ItemNumber' control is not found, so Nothing is returned. Which is what the error means.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thx for reply
"The 'ItemNumber' control is not found, so Nothing is returned. Which is what the error means."
Dim ItemNumber As String
The 'ItemNumber' control declared in the code as a String
How can find the control
Thx
Keerthi
|
|
|
|
|
you can use DataGridItemEventArgs object to find out the textbox.
for example in C#:
Private void DataGrid1_EditCommand(object sender,DataGridItemEventArgs e)
{
TextBox txt=(TextBox)e.item.FindControl("ItemNumber");
txt.SelectedValue=" ";
}
VanithaVasu
|
|
|
|
|
How can i read an excel file usin asp.net. Is it possibble or not
Please help me ....
Sarith...
|
|
|
|
|
|
|
Hope it helped
I Love SQL
|
|
|
|
|
http://www.dotnetjohn.com/articles.aspx?articleid=54
Regards
John
|
|
|
|
|
Hi all,
I have a GridView that gets populated with a sqldatasource, then I have a detailsview that I use to update the values in the database, the gridview has autogenerateselect=true and when you select the row it should populate the details view, but I'm having trouble and the only reason that I can think of is because I have 2 columns as the primary key, because when I click on the select button on the gridview the detailsview just disapears. Can anyone please point me into the right direction as how I could fix this.
Here is the code that I use.
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1"
DataKeyNames="menu_id,menu_language" AutoGenerateColumns="false" AutoGenerateSelectButton="true" AllowPaging="true">
<Columns>
<asp:BoundField ReadOnly="false" HeaderText="Id" DataField="menu_id" NullDisplayText="N/A" />
<asp:BoundField ReadOnly="false" HeaderText="Language" DataField="menu_language" NullDisplayText="N/A" />
<asp:BoundField ReadOnly="false" HeaderText="Text" DataField="menu_text" NullDisplayText="N/A" />
<asp:BoundField ReadOnly="false" HeaderText="url" DataField="menu_url" NullDisplayText="N/A" />
<asp:BoundField ReadOnly="false" HeaderText="Avtive" DataField="menu_active" NullDisplayText="N/A" />
<asp:BoundField ReadOnly="false" HeaderText="Content Id" DataField="menu_content_id" NullDisplayText="N/A" />
</Columns>
</asp:GridView>
</div>
<div>
<asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px"
DataSourceID="SqlDataSource2" AutoGenerateRows="false" DataKeyNames="menu_id,menu_language"
AutoGenerateDeleteButton="true" AutoGenerateEditButton="true" AutoGenerateInsertButton="true">
<Fields>
<asp:BoundField ReadOnly="false" HeaderText="Id" DataField="menu_id" NullDisplayText="N/A" />
<asp:BoundField ReadOnly="false" HeaderText="Language" DataField="menu_language" NullDisplayText="N/A" />
<asp:BoundField ReadOnly="false" HeaderText="Text" DataField="menu_text" NullDisplayText="N/A" />
<asp:BoundField ReadOnly="false" HeaderText="url" DataField="menu_url" NullDisplayText="N/A" />
<asp:BoundField ReadOnly="false" HeaderText="Avtive" DataField="menu_active" NullDisplayText="N/A" />
<asp:BoundField ReadOnly="false" HeaderText="Content Id" DataField="menu_content_id" NullDisplayText="N/A" />
</Fields>
</asp:DetailsView>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
SelectCommand="Select * from [menu_items]"
ConnectionString="<%$ connectionStrings:localSqlServer %>">
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
SelectCommand="Select * from [menu_items]"
FilterExpression="menu_id = '{0}' and menu_language='{1}'"
ConnectionString="<%$ connectionStrings:localSqlServer %>"
DataSourceMode="DataSet"
UpdateCommand="Update [menu_items] set [menu_text] = @menu_text, [menu_url] = @menu_url, [menu_active] = @menu_active,
[menu_content_id] = @menu_content_id where [menu_id] = @menu_id and [menu_language] = @menu_language"
InsertCommand="Insert into [menu_items] values(@menu_id, @menu_language, @menu_text, @menu_url, @menu_active, @menu_content_id)"
DeleteCommand="Delete from [menu_items] where [menu_id] = @menu_id and [menu_language] = @menu_language"
ConflictDetection="OverwriteChanges" EnableCaching="true"
CacheKeyDependency="MyKey" CacheDuration="Infinite">
<FilterParameters>
<asp:ControlParameter Name="menu_id" ControlID="GridView1" PropertyName="SelectedValue" />
<asp:ControlParameter Name="menu_language" ControlID="GridView1" PropertyName="SelectedValue" />
</FilterParameters>
Thanks in advance
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
I got this working, I changed the PropertyName of the ControlParameter from SelectedValue to SelectedDataKey[index]
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
I have a page that creates gif images in asp.net. i stored the image name in my hashtable. now i want to delete the file when the user closes the page or when the session ends. The session_start fires ok. I have set my sessionState on web config file to <sessionstate mode="InProc">
but session end does not seem to fire.
Please please help
please help
Don't argue with a fool because he/she will bring you down and beat you with exprience
|
|
|
|
|
hi,
Delete all session setting from web.config file or apply default setting at there. The default setting for SessionState is "InProc".
Try this.
Naresh Patel
|
|
|
|
|
Thanks but i did that ecxatly, but its not working!!!
i have got this on my web.config file: <sessionstate mode="InProc">
on my page i have this line session("fileName") = strFilename
on Session_start i have
Session("Started") = "True"
on Session_End i have
FileIO.FileSystem.DeleteFile(Session("fileName").ToString)
but still it not firing...
Motivation alone is not enough, if you have an idiot and you motivate him/her, you now have a motivated idiot
|
|
|
|
|
For deleting use System.IO.File.Delete("fullfilenamewithpath");
Naresh Patel
|
|
|
|
|
You wanna see the session_end events firing, hum?
Set the breakpoint in Session_End event.
Restart the IIS.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|