|
Hi,
I am trying to write in file then this exception was occured
the code is as
LogFilePath has file path
FileStream _Stream = new FileStream(LogFilePath, FileMode.Append);
TextWriterTraceListener _TraceListener = new TextWriterTraceListener(_Stream);
Trace.Listeners.Add(_TraceListener);
_TraceListener.WriteLine(message);
_TraceListener.Flush();
Trace.Flush();
_Stream.Close();
please reply if any one solution for this.
thnx
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
Hello everybody,
I have a gridview where a textbox column is present.I have another column which contain a javascript calender. My gridview is dynamically generated. I want to assign the textbox value through the calender.
My gridview code is as below
<asp:gridview id="GrdSubs" runat="server" bordercolor="Transparent" cellpadding="4">
CellSpacing="2" CssClass="text" ForeColor="#333333" GridLines="None" PageSize="4"
Width="600px" OnRowDataBound="GrdSubs_RowDataBound">
<footerstyle backcolor="#990000" font-bold="True" forecolor="White">
<rowstyle backcolor="#C9C9C7" bordercolor="#FF8000" borderwidth="3px" cssclass="grid_data">
ForeColor="#333333" />
<selectedrowstyle backcolor="#FFCC66" font-bold="True" forecolor="Navy">
<pagerstyle backcolor="#FFCC66" forecolor="#333333" horizontalalign="Center">
<headerstyle backcolor="#990000" cssclass="grid_header" font-bold="True" forecolor="White">
<alternatingrowstyle backcolor="WhiteSmoke" cssclass="grid_data">
<editrowstyle bordercolor="#80FF80" borderstyle="Solid" borderwidth="2px">
<columns>
<asp:templatefield headertext="Select">
<headertemplate>
runat="server" type="checkbox" />
<itemtemplate>
<asp:checkbox id="chkSelect" runat="server">
<asp:templatefield headerstyle-horizontalalign="Center">
<headertemplate>Start Date
<itemtemplate>
<asp:textbox id="sdate" runat="server" text="">]]>'>
if (!document.layers)
{
document.write("<img src="cal1.gif" onclick="popUpCalendar(GrdSubs__ctl2_sdate, Form1.GrdSubs__ctl2_chkSelect, \"dd/mm/yyyy\")" height="17" width="18"> ")
}
</img>
<asp:templatefield headerstyle-horizontalalign="Center">
<headertemplate>End Date
<itemtemplate>
<asp:textbox id="edate" runat="server">
if (!document.layers)
{
document.write("<img src="cal1.gif" onclick="popUpCalendar(this, Form1.edate, \"dd/mm/yyyy\")" height="17" width="18"> ")
}
</img>
Plz help me out
A key to every Solution
|
|
|
|
|
When a textbox column of a GridView is written out to the browser, the Id's of the text boxes are generated automatically by ASP.NET. The solution to your problem is letting the javascript calendar know the id of the textbox sitting next to it, in the same row of the grid.
You can do this in the RowDataBound event of the GridView which is fired as the data for each row of the GridView is bound.
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
}
} Once you access the TextBox you can assign the onclick event to it with the appropriate client side textbox Id.
myTextBox.Attributes["onclick"] = "popUpCalendar(this, " + myTextBox.ClientId + ", \"dd/mm/yyyy\")";
Use the ClientId property on the server side to get the id of the textbox which will be written to the browser for that particular row. By examining the source of the web page you will see that the onclick for each row will have the correct id for the associated textbox.
|
|
|
|
|
Hi,
I using OWC10(Office Web Component). In that iam creating a Bar chart, Pie chart etc.
Its showing in the Browser perfectly.
I want to convert the chart to pdf.
In the final step i have a byte array.
byte[] byteArr = (byte[])oChartSpace.GetPicture("png", 350, 350);
is it possible to send bytearray to convert pdf. Thanks
Thanks & Regards
Kumaran
|
|
|
|
|
i am doing network print spooler project i want to view the printer queue in asp.net website using c# can any one help me its urgent
|
|
|
|
|
if we keep gridview in loop to check for the values is the speed of the application get it slow
|
|
|
|
|
It depends on how many rows you have in the grid view.
|
|
|
|
|
hi sir how ru... in grid view iam having nearly 130 rows....if it becomes slow mean s how i can check sir
|
|
|
|
|
jagadeeshkumar2106 wrote: in grid view iam having nearly 130 rows
I don't think looping 130 rows will be a performance overhead. What are you doing by looping ? Performance depends on many other factors.
|
|
|
|
|
sir actually iam having two columns in the grid view one is hidden and the other one is visible now i have to compare the values with the hidden and present values and if they are differ i have to make the row color to be changed
|
|
|
|
|
Hi,
can some body tell me How to clear browser history pages programmatically from ASP.Net web page
|
|
|
|
|
Anuradha612 wrote: ASP.Net web page
This is not possible as ASP.NET page will be executed at the server and server don't have access to browser history. Why do you need to delete it ?
|
|
|
|
|
hey write this function to clear the browser history
Clear the IE's History
Sub ClearIEHistory()
Dim keyName As String = "Software\Microsoft\Internet Explorer\TypedURLs"
' delete the key that contains the URLs the history
Microsoft.Win32.Registry.CurrentUser.DeleteSubKey(keyName, False)
' recreate the key, empty
Microsoft.Win32.Registry.CurrentUser.CreateSubKey(keyName)
End Sub
hope it help u
|
|
|
|
|
Ravi_21 wrote: Sub ClearIEHistory()
Dim keyName As String = "Software\Microsoft\Internet Explorer\TypedURLs"
' delete the key that contains the URLs the history
Microsoft.Win32.Registry.CurrentUser.DeleteSubKey(keyName, False)
' recreate the key, empty
Microsoft.Win32.Registry.CurrentUser.CreateSubKey(keyName)
End Sub
This will clear server's IE history !
|
|
|
|
|
When ever i try to open the page, if there is some cached content, it retreives that old page instead of the newly updated one, then each time i had to refresh the page to reflect the newly made changes
Thanks in advance
|
|
|
|
|
How about having Cache disable directives for the page?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
N a v a n e e t h wrote: This will clear server's IE history !
But even that would have no effect. It would clear the Internet Explorer history of the ASP.NET profile on the server.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
There might be some solution to the problem, i am seriously stuck up with that issue
|
|
|
|
|
Have you tried in other browsers ? It looks like a browser setting issue. BTW, have you enabled caching on your webpage ?
|
|
|
|
|
hello guys,
i need to compare two word document contents.i'm loading both of word document into richtextbox.actually both document are the version of each other.so i want to mark the changes in higher version.
i can not use any tool i need to write the code for this.
all suggestions are welcome.
thanks
Amit Agarwal
|
|
|
|
|
I might be wrong, but try checking bytes. Get byte array for both files and check each locations.
|
|
|
|
|
hi,
Thanks for the Reply.
I tried a lot, but i'm not getting the actual logic for getting the differences between two files while i'm fetching both of them content into the richtextbox.
any suggestion on this.
Thanks.
Amit Agarwal
|
|
|
|
|
Have you checked comparing bytes ? It worked for me here.
|
|
|
|
|
ok, that's really great.
can u please available me the sample code.bieng a developer, its really bad for asking a code.
but i need it.what u suggest.
thanks
Amit Agarwal
|
|
|
|
|
Use File.ReadAllBytes() to get a byte array of the file. Like this take two byte arrays represents two files. By checking the array length, you will find which is big one. If both are same length, then loop through each bytes and check with the same location in second array.
Hope you can make it.
|
|
|
|