|
Hi All i am using Ajax Timer on Master page
<pre>
<asp:Timer ID="UpdateTimer" runat="server" Interval="5000" OnTick="UpdateTimer_Tick">
</asp:Timer>
<asp:UpdatePanel ID="up1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="UpdateTimer" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:Label runat="server" ID="DateStampLabel" />
</ContentTemplate>
</asp:UpdatePanel>
</pre>
and in other page say a.aspx i am using autocomplete extender which call the web service
<pre>
<asp:Label ID="lblICDCode" runat="server" Text="ICD Code"></asp:Label><br />
<asp:TextBox ID="txtICDCode" runat="server"></asp:TextBox>
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtICDCode"
MinimumPrefixLength="3" ServiceMethod="GetICDCode" ServicePath="~/WebService.asmx"
FirstRowSelected="true" EnableCaching="true">
</cc1:AutoCompleteExtender>
</pre>
and a.aspx contain one add button
if i am clicking on that button i am getting permission denied in WebResource.axd.when i removed ajax timer from master page it is working fine and i am using free text box conptrol for rich text editor
how to fix this
regards,
amit
-- Modified Wednesday, August 4, 2010 2:59 AM
|
|
|
|
|
Amit Patel1985 wrote:
<asp:Timer ID="UpdateTimer" runat="server" Interval="5000" OnTick="UpdateTimer_Tick">
</asp:Timer>
<asp:UpdatePanel ID="up1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="UpdateTimer" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:Label runat="server" ID="DateStampLabel" />
</ContentTemplate>
</asp:UpdatePanel>
after add pre tag click preview button to view tag are well formatted. more readability reflect on count of answers. do update your question.
|
|
|
|
|
Hi All,
I am working on a 3-tier asp.net application. Currently I'm stuck up in a situation where I need to handle a specific type of exception (User Defined) in DAL and Show alert to the user if that exception occurs in DAL.
I tried following things:
1) I raised that exception from the DAL and catch it in BLL and throw a new BLL exception to for that DAL exception and finally catch it in the UI layer to show the alert to the user. I've successfully implement this in my project. But there are some issues in this approach. First of all I feel this is not right way to do this as it may lead to performance related issues. Secondly, the application contains more than 500 pages and classes. so I need to attach additional catch block in every method to catch the BLL exception. which is the last option i'd like to take.
2) in second approach I logged the the DAL exception into a text file. but problem in this approach is that how could the UI layer know that exception has occurred and show the alert to the user. Is there any event in asp.net where i could handle all this activities?
my question is what is the best approach to handle this type of situation? Will Exception handling block help me in this?
I've tried reading many articles on this but i couldn't get an answer for my question? I might not be using right keywords for my search.
Thanks in advance,
Regards,
Paramhans Dubey
|
|
|
|
|
How to replace text with image in word 2007 and save the file in .pdf format
this is my code
_wordapp.ActiveWindow.Selection.WholeStory();
_wordapp.ActiveWindow.Selection.Copy();
IDataObject data = Clipboard.GetDataObject();
string temp = "";
temp = data.GetData(DataFormats.Text).ToString();
temp = temp.Replace("\r", "");
string[] arrtemp = temp.Split(Environment.NewLine.ToCharArray());
int pos = 0;
for (int t = 0; t < arrtemp.Length; t++)
{
if (arrtemp[t].Contains("Sign1"))
{
pos = t;
string fileName = GetSignPath(); //the picture file to be inserted
Object oMissed = _aDoc.Paragraphs[pos].Range; //the position you want to insert
Object oLinkToFile = false; //default
Object oSaveWithDocument = true;//default
_aDoc.InlineShapes.AddPicture(fileName, ref oLinkToFile, ref oSaveWithDocument, ref oMissed);
File.Delete(fileName);
this.FindAndReplace("Sign1", "");
}
}
Its replacing at wrong place instead of where i wanted(i.e. in place of Sign1)
Sign1 is the text given in the Word 2007 to find and replace it with image
Instead it is placing sumwhere else only in the .pdf file
Please suggest me the code to solve it
Its urgent
Thanks,
Harish
|
|
|
|
|
raghvendrapanda wrote: Its replacing at wrong place instead of where i wanted(i
well your problem lies on the following code
raghvendrapanda wrote: pos = t;
t is your array index not position index within your text. You need to take into consideration word length as well, don't you?
|
|
|
|
|
Would u please guide me how i can do by taking length into consideration.
Thanks,
Harish
|
|
|
|
|
I already did, see my earlier message. You need to take the length of the word into account when calculating position
first position = length of first word
subsequent positions = last position + length of word at hand.
You need to make up for spaces as well. Good Luck.
|
|
|
|
|
Hi Yusuf,
Dude I tried but i am getting the exception.
_wordapp.ActiveWindow.Selection.WholeStory();
_wordapp.ActiveWindow.Selection.Copy();
IDataObject data = Clipboard.GetDataObject();
string temp = "";
int temp1 = 0;
temp = data.GetData(DataFormats.Text).ToString();
temp = temp.Replace("\r", "");
//temp = System.Text.RegularExpressions.Regex.Replace(temp, @"\r", "");
temp1 = Convert.ToInt32(temp.Length);
temp1 = temp.IndexOf("Sign1");
for (int t = arrtemp.Length - 1; t > 0; t--)
{
if (arrtemp[t].Contains("Sign1"))
{
//pos = t;
string fileName = GetSignPath(); //the picture file to be inserted
Object oMissed = _aDoc.Paragraphs[temp1].Range; //the position you want to insert
Object oLinkToFile = false; //default
Object oSaveWithDocument = true;//default
_aDoc.InlineShapes.AddPicture(fileName, ref oLinkToFile, ref oSaveWithDocument, ref oMissed);
//_wordapp.Selection.InlineShapes.AddPicture(fileName,ref oFalse, ref oTrue, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);
_wordapp.Selection.InlineShapes.AddPicture(fileName, ref oLinkToFile, ref oSaveWithDocument, ref oMissed);
File.Delete(fileName);
this.FindAndReplace("Sign1", fileName);
}
I am getting exception at below mentioned line
Object oMissed = _aDoc.Paragraphs[temp1].Range;
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in WindowsFormsApp_Templates.exe
Additional information: The requested member of the collection does not exist.
Need help.Got stuck at this place.
Thanks,
Harish
|
|
|
|
|
Hi,
i am pulling data from database to the pdf file but i need to show those data in page by page. Here i am using iTextSharp for pdf. Is there any page break options. I did try
document.NewPage(); But it didn't work out. Any ideass??
suchita
modified on Tuesday, August 3, 2010 2:57 PM
|
|
|
|
|
|
thanks you for the reply but its complex for me. Do you have some simpler methods ?? Well i already have my pdf file in pages but they aren't in well format. i mean there is still header and footer missing in my pdf file. Most of all, I wanted to show topics and descriptions page by page. E:g each topic should start in new page with description. is there any way to do that ?
suchita
|
|
|
|
|
SayamiSuchi wrote: thanks you for the reply but its complex for me. Do you have some simpler methods ??
I don't understand what is complex about that blog? If that is complex for you, how in the world will you solve real world problems?
|
|
|
|
|
Thank you for the reply.
Sorry for the misunderstanding. Well i was doing the similar kind of thing .I don't know i lacked clarifying you guys to my problem. Lets try again.
I have my code like this:
Document pdfDoc = new Document(PageSize.A4, 40f, 40f, 50f, 50f);
pdfDoc.NewPage();
well the size and the margins are ok. And based on that, when i pulled the data from the dataset, it is showing in the different pages. Well that is also fine. But my problem is something like this:
If i am pulling the data from the database like shown below:
Books
book_1
book_2
book_3
Furniture
Furniture_1
Furniture_2
Furniture_3
Stationaries
Notepad
Markers
Pen
Now I am sending them to pdf file. Now lets say the items under each categories(Books,Furniture,Stationaries) are very long that it fits almost the whole page of the pdf.
Now I want the each categories starts with the new page in the pdf. Well
pdfDoc.AddPage is working but that one didn't work in my case. I tried that already. So any ideas for this kind of issues ??
suchita
|
|
|
|
|
SayamiSuchi wrote: So any ideas for this kind of issues ??
You are working with a propriety component, I guess. I have no idea, your best bets is to check their documentation/help/forum.
|
|
|
|
|
Hi,
As i am newbie to asp.net mvc i would like to know the best practices to solve below scenario.
In a user profile page i have list of interest. These data is populated from "Interest" table.
Which should be displayed as below.
Name : [ Text box ]
....
Interest:
Interest 1 O Yes O NO
Interest 2 O Yes O NO
Interest 3 O Yes O NO
Interest 4 O Yes O NO
.....
Where Yes/No is option button, Where user can select interest. While submitting these values need to be stored in "User_Interest" table. where values in other controls are stored values in "User" table.
Technologies using : MVC,Jquery, Linq
My Questions are:
1. How to use same view for Create/Edit
2. How to identify and save selected interests
3. How to set previously selected Interest while editing.
4. best way to create view model.
If you can point me similar examples that would be great.
Thanks in advance
|
|
|
|
|
I think you are getting confused by the technology. It isn't that difficult. There are many examples that show how to exchange data between controllers and views, what research have you done so far? Have you looked here, http://www.asp.net/mvc[^]?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi Mark,
Thanks for your reply.
I just stepped into MVC 1 day before for a project that needs quick completion. In the mean time i am trying to learn it in-depth. Yes i am little bit confused on the approach on Radio button list scenario in MVC not on how view and controller works.
I like the approach in below link.
http://robtennyson.us/post/2009/03/08/ASPNET-MVC-Default-Model-Binder-with-Lists.aspx[^]
But haven't had got a clear idea on gathered these information on a jquery(on button click) and pass to controller as ajax call. In the controller Add newly selected item .. and delete old item
View -- JQuery -- Controller
Hope you got my scenario
|
|
|
|
|
|
I have two calendar controls on same page,if month selection on title bar of calendar is changed on one calendar second calendar's month automatically get changed
|
|
|
|
|
So, what is the problem? You didn't mentioned your problem.
|
|
|
|
|
That's nice for you.
I'm assuming the hidden question there is "how do I do this?"
Capture the selected date changed event on calendar one, capture which is the selected month and then apply it to number two.
|
|
|
|
|
Mansi Arora wrote: changed on one calendar second calendar's month automatically get changed
This will help you.
<asp:Calendar ID="Calendar1" runat="server"
onvisiblemonthchanged="Calendar1_VisibleMonthChanged"></asp:Calendar>
<asp:Calendar ID="Calendar2" runat="server"></asp:Calendar>
protected void Calendar1_VisibleMonthChanged(object sender, MonthChangedEventArgs e)
{
Calendar2.TodaysDate = e.NewDate;
}
|
|
|
|
|
I have created rdlc reports in web.Please suggest a sample code for using one report viewer for all reports.All reports will be in one report viewer.Reports will be shown according to radiobuttons..Please help me..Give me a sample code.
|
|
|
|
|
Stop cross-posting - you should delete all duplicate questions if you hope to get an answer.
In any case, you have to try and work it out for yourself first and then ask here when you hit a snag that you cannot solve on a specific issue.
Remember, Google is your friend.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|