|
I use Timer1 to refresh few parts of masterpage but the timer refresh all page, and i need to refresh only specific parts of masterpage.
Is possible to refresh part of masterpage by using Timer1 Ajax Control?
|
|
|
|
|
I'm no expert in this area but I'm somewhat familiar with it. Call an AJAX method for the specific portion(s) of the master page maybe? Or put it in an UpdatePanel?
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
Thanks for reply.
I used UpdatePanels and masterpage get all refresh insted of refreshing only controls which are inside updatepanel.
|
|
|
|
|
|
I solved by removing other controls from updatepanels, i have put controls inside updatepanel only that controls which must be refreshed, other controls i removed from updatepanels. Now works great.
Thanks for assistance.
|
|
|
|
|
---TRY---
<div>
<asp:UpdatePanel ID="UpdatePanel4" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" ontick="Timer1_Tick" Interval="300000" >
</asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
</div>
---OR---
<asp:UpdatePanel ID="UpdatePanel4" runat="server">
<ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
<asp:Timer ID="Timer1" runat="server" ontick="Timer1_Tick" Interval="300000"> </asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
|
|
|
|
|
So on the users page the user can use a drop down to select their name and then click 'view' to view the list of holidays they have previously booked. From here they can choose 'select new' which will allow the user to create a new holiday. This all works fine however I want the username to be stored from the original drop down and displayed in the creating page. Instead of having 2 seperate drop downs on each page.
I have tried:
My first drop down in my Index.chtml
@Html.DropDownListFor(model => model.HList4DD.First().HolidayDate, new SelectList(Model.PList4DD, "Id", "Name", Model.currentPersonID), "--select--")
My second drop Down on the create view:
@Html.DropDownListFor(model => model.PersonId, new SelectList(ViewBag.Id, "Value", "Text"),"---Select---")
-----------------------
I wanted to change this to the name of the user previously selected so in my get of the Index I have used:
TempData["CurrentPersonID"] =currentPersonID;
Then to replace my second drop down im trying something like:
@TempData["CurrentPersonID"]
<div>
@Html.LabelFor(model => model.currentPersonID, "currentPersonID")
@Html.ValidationMessageFor(model => model.PersonId)
</div>
Any suggestions? Thanks
|
|
|
|
|
I have implement comet.when client request to server,that request wait to server till the new message arrives.when new message arrives it get back to client.after completion of responce processing client request to server again and wait for new message.
This is working fine for upto 10 request wait at server but then after server can't responce of new request and site getting hanged and have to recycle the application pool.I found the state of all request is ExecuteRequestHandler in workerprocess of IIS.
Please tell me what should i do??
|
|
|
|
|
Try to use client side code.
may be you have used more session or application state
|
|
|
|
|
string strUsername = "kapil.sh06@gmail.com";
string strPassword = "XYZXYZXYZZXYZXYZXYZXY";
string strSignature = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
string strCredentials = "USER=" + strUsername + "&PWD=" + strPassword + "&SIGNATURE=" + strSignature;
string strNVPSandboxServer = "https://sandbox.paypal.com/cgi-bin/webscr";
string strAPIVersion = "2.3";
string strNVP = strCredentials + "&METHOD=DoDirectPayment&CREDITCARDTYPE=VISA&ACCT=400000500002000&EXPDATE=122017&CVV2=808&AMT=212.95&FIRSTNAME=Rohit&LASTNAME=Singh&IPADDRESS=192.168.200.31&STREET=1234+Easy+Street&CITY=San+Jose&STATE=CA&COUNTRY=United+States&ZIP=95110&COUNTRYCODE=US&PAYMENTACTION=Sale&VERSION=" + strAPIVersion;
HttpWebRequest wrWebRequest = (HttpWebRequest)WebRequest.Create(strNVPSandboxServer);
wrWebRequest.Method = "POST";
StreamWriter requestWriter = new StreamWriter(wrWebRequest.GetRequestStream());
requestWriter.Write(strNVP);
requestWriter.Close();
HttpWebResponse hwrWebResponse = (HttpWebResponse)wrWebRequest.GetResponse();
StreamReader responseReader = new StreamReader(wrWebRequest.GetResponse().GetResponseStream());
string responseData = responseReader.ReadToEnd();
responseReader.Close();
Response.Write(Server.UrlDecode(responseData));
this code is not working proper please help me and suggest me right Code .. for paypalPro
|
|
|
|
|
I would suggest starting here.[^] They should have samples to show you. It is likely your URL or a parameter is off.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
At the min, any user can book a holiday for ay employee,
I have added [Authorization] to the controllers, and @if (User.Identity.IsAuthenticated)
in the layout so only logged in users can view the pages. But how can I go about only allowing users to book a holiday for them selves
something like if loggedInUserID(is this assigned automatically when a user is created?) =currentPersoID, although this is only a guess and I would prob have to assign the same loggedInUserID to personID.
any suggestions?
Thanks
|
|
|
|
|
No doubt each employee has a username/name so you can use use compare the username/name of the logged in user to the username/name of the person for whom the holiday booking id for.
|
|
|
|
|
Hi,
I get error while using this code ?
<asp:TemplateField>
<ItemTemplate >
<asp:ImageButton ID="ImageDeleteBuyingKala" ImageUrl="~/ServerFile/ApplicationFiles/Icons/Button/add.png"
Width="25" runat="server" OnClientClick="Open('<%# Eval("Id") %>')" />
</ItemTemplate>
</asp:TemplateField>
I have Solved this via :
<script type="text/javascript">
function Open(IdItem) {
// to handle in IE 7.0
if (window.showModalDialog) {
window.showModalDialog(location.protocol + "//" + location.host + "/" + "WorkFlows/Forms/BuyingKala/Estelam.aspx?Id=" + IdItem, "Show Popup Window", "dialogHeight:450px,dialogWidth:80%,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes,center:yes");
}
// to handle in Firefox
else {
window.open(location.protocol + "//" + location.host + "/" + "WorkFlows/Forms/BuyingKala/Estelam.aspx?Id=" + IdItem, "Show Popup Window", "height=450px,width=80%,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes,center:yes");
}
// window.showModalDialog(location.protocol + "//" + location.host + "/" + "WorkFlows/Forms/BuyingKala/Estelam.aspx?Id=" + IdItem, null, "height=290px,width=400px,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes")
}
</script>
<ItemTemplate>
<asp:ImageButton ID="ImageEstelamBuyingKala" ImageUrl="~/ServerFile/ApplicationFiles/Icons/Button/add.png"
Width="25" runat="server" OnClientClick='<%# " Open("+ DataBinder.Eval(Container.DataItem,"Id") + ");" %>' />
</ItemTemplate>
now the problem is that when that child page open and i click the save button to save the items in the gridview in child page it repoen that child page once more .
modified 17-Dec-12 5:32am.
|
|
|
|
|
What is the error?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi friends. is it possible to use an asp web site like a telephone. i ve made a website. there are 10 users of this website. ı can understand who is online and who isnt. is it possible to put a button whose text is "talk to this user" next to each user and send and play this sound stream at remote side. I found this Sending and playing microphone audio over network[^] but it is quite complicated to me. Do you have an easier idea.
|
|
|
|
|
Do you want the site to actually make phone calls to the users or do you want to just play the audio to them on their speakers?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
phone calls via their microphones. I couldn't find an exact solution yet but i am thinking of this:
When a user clicks on a button to talk to someone else, i am planning to create a rtp stream. this stream wont go to anybody's computer. It will go to server itself but with some unique number on it. Somehow i will try to make users decode this stream using those unique numbers.
|
|
|
|
|
I haven't done that before. I have done phone calls, and products like Microsoft Speech Server make it pretty easy.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
dear sirs
i have DropDownList bounded to a datasource , when i read its SelectedValue , the displayed item is changed in the dropdownlist
say dropdownlist contains item1 , item2 , item3 , item4 , ...etc
whatever i select , the dropdownlist changed to item2
thx
dear sir
i discovered the problem became more complicated than i thought
some more background is needed
the dropdownlist is binded to datasoure ( username , password , user rank), i display the username and i return the password in selected value and the dropdownlist sorted by rank
indeed the dropdownlist working so fine and the selected item remains even after reading selected value but IN ONLY ONE COND. that such username has a unique password
for example:
user pass
aaa 1234
bbb 1234
ccc 34343
dddd 67657
if i choose ccc it will return 34343 selected index 2
if i choose dddd it will return 67657 selected index 3
if i choose aaa it will return 1234 if aaa is higher rank than bbb
if i choose bbb it will return 1234 selected index 1
please kindly help me
thx alot
bye
modified 16-Dec-12 16:26pm.
|
|
|
|
|
set AutoPostBack to false.
|
|
|
|
|
DropDownList.SelectedValue is already false
|
|
|
|
|
whether in its Page_Load event has been added
like this:
(! Page.IsPostBack)
{
}
to be this
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
}
}
|
|
|
|
|
I use a windows 2008 R2 dedicated server. Recently I'm in a weird problem. I host almost 15 sites in that server.All works well and the average cpu load remains 10-15 all time. Recently one of the sites starts troubling me. When it starts, the Cpu reaches 99-100 and all getting stopped. When I stopped that site and and its application pool, the server come back to normal way. This isnt a over traffic problem.Even when I point the hosted files to another domain, that site works well. Such as, My problematic site is abc.com. When I point the directory of abc.com to other xyz.com, no problem occurs. But starting abc.com hangs all things. I find that php-cgi.exe and mysqld.exe cause that damage, but same code running under other domain remain intact. ANd again this is not a trafic issue, as no sooner than I had started abc.com, cpu reaches 100%!!! Please suggest something to get me out of this.
|
|
|
|