|
Could not load file or assembly 'Telerik.Web.UI, Version=2010.2.929.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies.
You are using Telerik controls in your application. You must have installed Telerik controls on your system such that you can use them in your project locally. Post installation, you have telerik dll's reference in your project that allowed you to use the telerik controls.
When you published it on server, application is looking for telerik assembly (Telerik.Web.UI, Version=2010.2.929.40) to reference the controls used but is missing. Just find the telerik dll on your local system and place it in BIN folder of your web application on server. It should be good to go.
|
|
|
|
|
I need to create an image of a pdf file, so I'm shopping around for something free.
I'm giving the Tall PDF Thumbnail a spin, but making some changes. The documentation shows uploading a pdf file, and grabbing the bytes of the inputstream, writing it to a session key, and then pointing the Tall Object to the session key.
How they do it, via file upload in c#
byte[] buffer = new byte[postedFile.ContentLength];
postedFile.InputStream.Seek( 0, System.IO.SeekOrigin.Begin );
postedFile.InputStream.Read( buffer, 0, postedFile.ContentLength );
string sessionID = Session.SessionID;
Session[sessionID] = buffer;
I want to read it off the disk drive, because it's already there, but in vb
Dim uniqueKey As String = Guid.NewGuid().ToString()
Dim fileStream As FileStream = File.OpenRead(physicalPath)
Dim fileLength As Long = fileStream.Length
Dim buffer() As Byte = New Byte(fileLength) {}
fileStream.Read(buffer, 0, buffer.Length)
Context.Session.Add(uniqueKey, buffer)
In theory, bytes are bytes, regardless of how you get them, so I should be able to create the same data buffer needed to feed the Tall Object, to create a thumbnail, but I'm not able to get the object to do it's thing.
My question is, does my translation look correct, and is my theory valid here, or am I way off base on this?
|
|
|
|
|
So my code was correct, I was missing an empty webform that held the image source.
The image is pretty small though, could use something larger.
If anybody knows of some free code to convert a pdf to a png or jpg, let me know.
|
|
|
|
|
Hello!
My name Makara called Blueshark.
I want to ask you
How should i get Microsoft speech Object Library 5.0 into my vb.net?
|
|
|
|
|
|
In a C# 2010 web form application that I am working on, I am hoping there is a better way for page 1 and page 2 to communicate with each other besides using just session variables. Basically on page 1 there are 'clear and 'next' buttons. The clear button clears the page and the 'next' button updates the database and points the user to page 2.
On page 2, I have the following buttons: back, delete, and submit.
Basically the user enters most of their information on page 1. They hit the 'next' button to continue entering information. If the user wants to change some of the information on page 1 when they are on page 2, the user hits the 'back' button.
Thus my problem is on page 1 for the 'next' button. This button needs to know if the user has hit the 'back' button from page 2. If the user has returned from page 2 to page 1, the user will only update a row in the database. If this is the first time for the user on the database, then, then an insert needs to occur in the database.
The only way I can think of for the two pages to communicte with each other is to use session variables.
If you have any other suggestions, can you tell me what they are?
|
|
|
|
|
|
Hi all,
I have created a user control which has a grid on a Asp:Panel, and a button.
When the user control is placed on a page only the button will be displayed and on the click of this button the panel will be displayed as a popup using ModalPopupExtender.
This page postbacks to itself on another button, during this event the Panel is displayed for a second and then goes off.
How can that be avoided? I don't want the Blank Panel to displayed while page load.
I have already tried setting the panel's visibility in various events of page life cycle to avoid it... but none works.
Any help or direction would be appreciable.
Thanks,
AB
Thanks & Regards,
AB
"Everyone is a genius at least once a year"
|
|
|
|
|
I think the original concept of the extender was to close or hide the panel after a postback is issued.
To keep the panel visible, use the show or hide in your postback code.
modalpopupextender.show()
modalpopuextender.hide()
|
|
|
|
|
I have done the same, but the problem is during page rendering the Panel is rendered for few seconds and then goes off... I don't want the panel to be displayed until the button is clicked.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
I have the following questions to ask about using session variables in a C# 2010 web form application that I am working on:
1. Do session variables exist on one one web page and/or can you pass the session variables between two web pages in the same web application? Can the session variables be shared between the two web pages? Can you explain your answer?
2. When a user is logged into a data web application that is used to update 2 tables in a sql server 2008 r2 database and uses session variables, do the session variables retain the their values?
Basically a user enters information for customer One and updates the database. Now the user needs to enter information for a different customer that is customer number two. The user returns to the first of a series of web pages to enter the informnation for customer two.
Do the session variables between when data is entered for customer One and the start of customer two retain the same value? If so, can you tell me how to clear out the values for those session variables when the user goes to enter data for the second customer? If not, can you tell me how the session variables get automatically cleared out?
|
|
|
|
|
|
When you assign a session value, the session value is held by the IIS Web Server, during the lifetime of the Session.
In other words, when a user goes to your website, the web server creates a session ID for that user, and creates a timeout, which is usually 20 minutes by default.
During that period in which the session is active, you can assign session values that will last until the timeout period. No matter what page the user is viewing, the values will remain until the timeout, in which they are all destroyed.
Be careful using session values, they do consume server memory, and are susceptible to hacking.
[EDIT]
sc steinhayse wrote: how to clear out the values for those session variables
Session.Add("secureLevel", 5)
Session.Remove("secureLevel")
Session.Abandon()
Session.Clear()
|
|
|
|
|
for (int i = 0; i < dtCurrentTable.Rows.Count; i++)
{
DropDownList ddlFrequency = (DropDownList)mdlpopupGrid.Rows[rowIndex].Cells[4].FindControl("ddlFrequency");
drCurrentRow = dtCurrentTable.NewRow();
dtCurrentTable.Rows[i]["Start_Salary"] = ((TextBox)mdlpopupGrid.Rows[rowIndex].Cells[1].FindControl("txtStartSalary")).Text;
dtCurrentTable.Rows[i]["End_Salary"] = ((TextBox)mdlpopupGrid.Rows[rowIndex].Cells[2].FindControl("txtEndSalary")).Text;
dtCurrentTable.Rows[i]["Increament"] = ((TextBox)mdlpopupGrid.Rows[rowIndex].Cells[3].FindControl("txtIncreament")).Text;
dtCurrentTable.Rows[i]["Frequency"] = ddlFrequency.SelectedValue.ToString();
rowIndex++;
}
This is my Code in Which I assigns the Values of all textboxes & Dropdownlist within mdlpopupGrid into a Datatable...
But the Problem is I dont get the Selectedvalue of Dropdownlist to my Datatable dtCurrentTable
|
|
|
|
|
sheringkapoting wrote: But the Problem is I dont get the Selectedvalue of Dropdownlist
Are you getting the value of Textbox of each Cells??
Sanjay Kunjam
------------------------------------------------------------------
"Computers are useless. They can only give answers" - Pablo Picasso
------------------------------------------------------------------
|
|
|
|
|
Yes I Get the Values of Text Boxes, The problem lies only in Dropdown List....
|
|
|
|
|
change the name of ddlFrequency to ddlFrequencyFC or anything..just rename it..
see the difference..
Thanks
|
|
|
|
|
In a C# 2010 web application, I would like to know how to convert a session variable that is in a date time format to a string value that displays in a textbox on the web application. I would like to only obtain the date part of the value.
I have tried lots of versions that look like the following:
Date1.Text = Session["Date1"].ToString("yyyy-MM-dd HH:mm:ss");
How would you setup this code so the value is acutally set correctly for the textbox?
|
|
|
|
|
Well, if you store the current date time in the session, then you might as well format it first before assigning to the session
session.add("Date1", DateTime.Now.ToString("yyyy"))
|
|
|
|
|
You need to cast the value you get from the session to a DateTime before you call ToString on it. Something like this (you can probably take out a few parens):
Date1.Text = ((DateTime)(Session["Date1"])).ToString("yyyy-MM-dd");
If you want to show a full date/time, but you only want the date component from the session, you can use the Date property, which will strip out the time:
Date1.Text = ((DateTime)(Session["Date1"])).Date.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
DateTime dt = Session["Date1"] as DateTime;
if(dt != null)
{
Date1.Text = dt.ToString("yyyy-MM-dd");
Date1.Text = dt.ToString("yyyy-MM-dd HH:mm:ss");
}
else
{
}
Every now and then say, "What the Elephant." "What the Elephant" gives you freedom. Freedom brings opportunity. Opportunity makes your future.
|
|
|
|
|
I have a Modal Popup Extender which I show on two different Button click events i.e
btnAddNew_Click() & having imgbtnNew as TargetControlID.
the problem is I want Two of the Textboxes txtFullName & txtShortName to be Disabled or Visible false on imgbtnNew_Click()
Where as Visible True on btnAddNew_Click()
Can anyone help....
|
|
|
|
|
I think you can ask the sender "sender" who fired the and called the function. I just used it a couple of days ago. You could of just Googled it to get the anwser.
string strID = ((System.Web.UI.Control) sender).ID;
{EDIT]
or you can use the .OnClientClick to issue some javascript to change the display state of the textbox from block to none. The javascript is fake, and just meant to give you an idea of how to use OnClientClick
.OnClientClick = "var txtID = getElementByID('txtBox'); txtID.style.display = 'none'; return true;"
|
|
|
|
|
While Executing the asp.net (C#) page. I found an error called Expected ')'. Actually the code block and design block doesn't contain any error..but it representing such error.. need to resolve it. kindly help me to solve this issue
dhipika g
|
|
|
|
|
The close brace is missing and you need to find it. Given the amount of code you've shown, I'd suggest looking over there behind the aspidistra.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|