|
Oh yes, I totally forgot about it!
|
|
|
|
|
You probably forgot because your first suggestion is the replacement for the deprecated property.
[BrowsableAttribute(false)]
[ObsoleteAttribute("The recommended alternative is Page.SetFocus and Page.MaintainScrollPositionOnPostBack. http://go.microsoft.com/fwlink/?linkid=14202")]
public bool SmartNavigation { get; set; }
http://msdn.microsoft.com/en-us/library/system.web.ui.page.smartnavigation.aspx[^]
|
|
|
|
|
5!
Thanks for bringing back some part of memory.
|
|
|
|
|
How we can find html radio button id in asp.net in side datalist control.
....................
Thanks
|
|
|
|
|
Even though the person who asked this in Q&A has different user id, he had same question that I replied here: access to html radio button that created dynamically[^]
You cannot write anything here to access them. You made a HTML control and not server control. HTML controls cannot be accessed on server side codebase.
|
|
|
|
|
I am using this code to save file to MySQL but when I try to open the file after saving it I get an error saying:
Word was unable to read this document. It may be corrupt.
here is the code to write:
file_name = Path.GetFileName(uploadResume.PostedFile.FileName);
file_extension = Path.GetExtension(uploadResume.PostedFile.FileName);
switch (file_extension)
{
case ".pdf": document_type = "application/pdf"; break;
case ".doc": document_type = "application/vnd.ms-word"; break;
case ".docx": document_type = "application/vnd.ms-word"; break;
case ".gif": document_type = "image/gif"; break;
case ".png": document_type = "image/png"; break;
case ".jpg": document_type = "image/jpg"; break;
case ".jpeg": document_type = "image/jpg"; break;
}
int file_size = uploadResume.PostedFile.ContentLength;
byte[] document_binary = new byte[file_size];
uploadResume.PostedFile.InputStream.Read(document_binary, 0, file_size);
and then passing it as parameters:
sql_command.Parameters.AddWithValue("param_resume_format", document_type).MySqlDbType = MySqlDbType.VarChar;
sql_command.Parameters.Add("param_resume_data", MySqlDbType.Blob, file_size).Value = document_binary;
and here is how I am retrieving it:
sql_connection = new MySqlConnection(ConfigurationManager.ConnectionStrings["SQLdb"].ConnectionString);
sql_connection.Open();
sql_command = new MySqlCommand("sp_get_resume_by_id", sql_connection);
sql_command.CommandType = CommandType.StoredProcedure;
sql_command.Parameters.Add("param_resume_id", MySqlDbType.Int32).Value = resume_id;
sql_reader = sql_command.ExecuteReader();
sql_reader.Read();
if (sql_reader.HasRows)
{
file_name = sql_reader["resume_id"].ToString() + sql_reader["resume_ext"].ToString();
byte[] document_binary = (byte[])sql_reader["resume_data"];
FileStream file_stream = new FileStream(@"C:\Temp\" + file_name, FileMode.Create);
file_stream.Write(document_binary, 0, document_binary.Length);
file_stream.Close();
file_stream.Dispose();
txtResume.Visible = true;
}
|
|
|
|
|
In a BLOB, you can store a maximum of 65535 bytes. Check that your file did not get truncated; if necessary, change the field type to MEDIUMBLOB or even LONGBLOB.
|
|
|
|
|
changed to longblob in the code (the parameter) and the MySQL field data type but still getting the same error. Here is the exact error I am getting when I am trying to open the downloaded word file.
This error message can appear if the document you are attempting to open is corrupt. It is possible to recover a corrupt file or its content by using either the Recover Text converter (may require installation) or the Open and Repair feature.
The Open and Repair feature is available from the Open dialog. To open and attempt a repair, click the File tab, click Open, and then navigate to the damaged file and click it once. Instead of clicking the Open button at the bottom right of the dialog box, click the down arrow to the right of the button and select Open and Repair from the menu. If the file can be recovered, it will open and appear in the document work area.
The Recover Text converter, if installed, is available from the Open dialog and appears in the Files of type drop down list. It appears in the drop-down list as Recover Text from Any File (*.*).
For more information, see Microsoft Knowledge Base article 918429.
|
|
|
|
|
|
vishnukamath wrote: Please suggest me better way.
What's the problem with the article suggested way?
Simple logic: Have multiple XMLHttpRequests on load of page (equal to number of user controls - each mapped to one area on page to be shown in a panel). Each request will get the HTML of a defined panel. Once the response is received, show the panel with HTML returned.
|
|
|
|
|
vishnukamath wrote: can we load user controls one by one
You really can't load each control one by one, unless you made separate calls to the server and asked for each control 1 at a time.
All you can do is create a container to hold your dynamic controls, and update the container in either a single request to the server, or multiple requests to the server.
vishnukamath wrote: with loading image
In either case, javascript is required to alter the elements in the DOM, and when Javascript makes a change to the DOM, it rams the script through with complete disregard to any order or timing you wish to achieve, unless you add painting events to the script.
vishnukamath wrote: we have found below link for asynchronous loading.Please suggest me better way.
I inspected the link you provided, and it looks like a good solution. I don't see the problem with trying it out, unless the article was too complicated for you and your looking for something easier.
The only better way I can think of is the way Code Project does it. But if you have to ask how to do it, then I think ....
|
|
|
|
|
How do I handle wrongly suffixed url of webpages?
for eg:
Correct url:
http://mdc01c/en/Journey/
Played with url:
http://mdc01c/en/Journey/df
how to handle 'Played with url' case in ASP.Net?
Please guide. Thanks.
// ♫ 99 little bugs in the code,
// 99 bugs in the code
// We fix a bug, compile it again
// 101 little bugs in the code ♫
|
Tell your manager, while you code: "good, cheap or fast: pick two. "
|
|
|
|
|
Ravi Sant wrote: how to handle 'Played with url' case in ASP.Net?
Display a 404-page?
What else would you want to do? You could log the IP from the requestor, and block them for a certain period if you're under the impression that they're looking for holes in your security.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I am sorry, if have wrongly or partially framed question.
I have already done that using customerrors=on in asp.net web.config.
But, it does not works for internal websites and I am to no-where since yesterday.
// ♫ 99 little bugs in the code,
// 99 bugs in the code
// We fix a bug, compile it again
// 101 little bugs in the code ♫
|
Tell your manager, while you code: "good, cheap or fast: pick two. "
|
|
|
|
|
you can do it by window.location = newUrl;
|
|
|
|
|
Hi,
I have a database structure similar to the following schema that holds survey information for different types of surveys:
http://www.databaseanswers.org/data_models/questionnaires_for_marketing_surveys/index.htm
I've created the surveys and the question that should appear on the survey from within the database. Currently I have 3 surveys each with different questions. How would I go about querying the database to create a html form with text boxes and radio buttons on the fly based on the what questions should appear on the survey form?
The hardway is to custom build the html forms with fields that map to the questions in the database. However this can become tedious when everytime a new survey form needs creating with different questions.
Basically am looking for some code example that will help me get started off to dynamically generate a html survey form based on the information stored in the database. I'm sure somebody must have done something similar before.
Any help will be much appreciated.
|
|
|
|
|
You need to create a table format that defines questions and combinations of questions that create a survey. Then you need to write a page that reads a combination of questions and asks them in order. You need to design it so that you write it once and can reuse it for any combination of questions.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i need to Implement Virtual scroll grid view with fix header. need to show the data on demand of scroll movement.
Mahendra
|
|
|
|
|
You can do this easily by creating a div that scrolls and contains your scrollable content.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
I'm trying to use fck editor with ASP.NET. I put the CKeditor in Toolbox menu and then put CKEditorControl on a (.aspx) page.
I want to edit a (.aspx) page on CKEditorControl and save it. Firstly i must call the page to the CKEditorControl, then edit and save for update. I couldn't call the page to CKEditorControl. How can i do this?
i mean i want to call HTML page to editor.
thanks...
modified 17-Jul-12 11:26am.
|
|
|
|
|
Don't cross post! Post in one forum only.
"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
|
|
|
|
|
I posted it first on Web Development forum. but then i thougt it's related to ASP.NET forum more than Web Development. it's not matter i can delete one of them. the matter is the problem i have.
thanks...
|
|
|
|
|
Well, unless your having an issue with asp.net and ckEditor, then it's related. But I don't see the relationship.
I just got done working with ckEditor, doing the complete integration and writing my own backend or fileBrowser for the image, flash and file buttons. It took a long time to complete the project.
That sounds like a good idea, but based on my experience with it, and I dug down really deep into it, Won't work. ckEditor will only render XHTML or HTML, and will not recognize asp objects or tags, unless you write your own plugin for asp.net.
And if you can write a plugin for it, then your on the cutting edge of JavaScript, thus master of it.
Thats my opinion!
|
|
|
|
|
Actually i am trying to call HTML codes to the editor. Because every .aspx page is a HTML page, i mean it has HTML codes. Normally, we can write HTML codes in CKEditorControl and can edit that. i thougt that if i call HTML codes i can edit it.. But i don^t know how is it possible..
Thanks..
|
|
|
|
|
murad_35 wrote: Because every .aspx page is a HTML page
aspx pages are webforms that contain a mixture of HTML Elements and asp.net objects or tag names that point to asp.net objects that reside in the asp.net framework.
murad_35 wrote: i am trying to call HTML codes to the editor
Now that I think about it, I really have no clue what your talking about here.
Are you trying to make your own ckeditor templates, that the user can select and load?
|
|
|
|