|
Tarani Dutt Joshi wrote: with help of coding it is possible with out any data base
If you plan to translate by your own, you would need database! If you want the conversion without too much of an effort, you can try a 3rd party translation service where you pass on the English words and get back the translated value. Google translate could be of help to start with.
|
|
|
|
|
I have a link of one webpage which is developed in dotnetnuke CMS and i want to view page source of page, the problem is that dotnetnuke does nt allow me to view page source programmatically.
How can I view page source programmatically?
|
|
|
|
|
Hi,
Why I am getting this error when insert is successful?!!! it should redirect to ~/Channels!
here is my code:
try
{
sql_connection = new MySqlConnection(ConfigurationManager.ConnectionStrings["SQLdb"].ConnectionString);
sql_connection.Open();
if (RouteData.Values["GUID"].ToString() == "New") sql_command = new MySqlCommand("sp_add_new_channel", sql_connection);
else sql_command = new MySqlCommand("sp_update_channel", sql_connection);
sql_command.CommandType = CommandType.StoredProcedure;
if (RouteData.Values["GUID"].ToString() == "New") sql_command.Parameters.AddWithValue("param_member_id", Convert.ToInt32(Session["member_id"])).MySqlDbType = MySqlDbType.Int32;
else sql_command.Parameters.AddWithValue("param_channel_guid", RouteData.Values["GUID"].ToString()).MySqlDbType = MySqlDbType.VarChar;
sql_command.Parameters.AddWithValue("param_channel_name", txtChannelName.Text.Trim()).MySqlDbType = MySqlDbType.VarChar;
sql_command.Parameters.AddWithValue("param_channel_address", txtChannelAddress.Text.Trim()).MySqlDbType = MySqlDbType.VarChar;
sql_command.Parameters.AddWithValue("param_channel_language", Convert.ToInt32(cboLanguage.Value)).MySqlDbType = MySqlDbType.Int32;
sql_command.Parameters.AddWithValue("param_channel_description", txtChannelDescription.Text.Trim()).MySqlDbType = MySqlDbType.VarChar;
sql_command.Parameters.AddWithValue("param_channel_allow_comment", chkAllowComment.Checked).MySqlDbType = MySqlDbType.Bit;
sql_command.Parameters.AddWithValue("param_channel_allow_like", chkAllowLikeIt.Checked).MySqlDbType = MySqlDbType.Bit;
sql_command.Parameters.AddWithValue("param_channel_allow_share", chkAllowShare.Checked).MySqlDbType = MySqlDbType.Bit;
sql_command.Parameters.AddWithValue("param_show_profile_photo", chkShowProfilePhoto.Checked).MySqlDbType = MySqlDbType.Bit;
if (RouteData.Values["GUID"].ToString() == "New") sql_command.Parameters.Add("param_channel_guid", MySqlDbType.VarChar).Direction = ParameterDirection.Output;
sql_command.Parameters.Add("param_is_exist", MySqlDbType.Bit).Direction = ParameterDirection.Output;
int result_rows = sql_command.ExecuteNonQuery();
if (Convert.ToBoolean(sql_command.Parameters["param_is_exist"].Value) != true)
{
website_event_log.add_event_log("Membership", txtChannelName.Text.Trim(), "You have successfully signed up");
Response.Redirect("~/Channels", true);
}
else
{
Session["message_title"] = "Error";
Session["message_title_Color"] = Color.Red.ToArgb();
Session["message_text"] = "The same channel address already exists. Please try another address.";
Session["message_button_title"] = "Back";
Session["message_button_url"] = Request.UrlReferrer.ToString();
Response.Redirect("~/Message", false);
}
}
catch (Exception exp)
{
Session["message_title"] = "ERROR..";
Session["message_text"] = String.Format("Please try again.......{0}{1}", "", exp.Message);
Session["message_button_title"] = "Back to Sign-in";
Session["message_button_url"] = Request.UrlReferrer.ToString();
Response.Redirect("~/Message", false);
}
finally
{
if (sql_connection != null)
{
if (sql_connection.State == ConnectionState.Open)
sql_connection.Close();
}
}
Technology News @ www.JassimRahma.com
|
|
|
|
|
Either the cast to "param_is_exist" failed, or website event log failed. I really think you need to move that whole code block to finally.
finally
if (Convert.ToBoolean(sql_command.Parameters["param_is_exist"].Value) != true)
{
website_event_log.add_event_log("Membership", txtChannelName.Text.Trim(), "You have successfully signed up");
Response.Redirect("~/Channels", true);
end try
|
|
|
|
|
but the finally will run no matter what try was successful or error was catched? right?
Technology News @ www.JassimRahma.com
|
|
|
|
|
Yes that is correct.
So you make an exitCode as an integer = 2
exitCode integer = 2
do your checks,
in the catch, make exitCode = 1
in the Try, exitCode = 0
So in the finally, if the exitCode is 2, it's complete failure
if the exitCode is 1, you trapped the error, log it or display it
if the exitCode is 0, the program ran correctly
exitCode integer = 2;
Try
exitCode = 0
catch ex as exception
exitCode = 1
Finally
switch exitCode {
case 2
case 1
case 0
response.redirect("~/correct");
}
}
}
|
|
|
|
|
I removed the try..catch..finally block and ran the code.. everything worked fine!!!
so where is the problem?
here is the code after commenting the try..catch..finally:
sql_connection = new MySqlConnection(ConfigurationManager.ConnectionStrings["SQLdb"].ConnectionString);
sql_connection.Open();
if (RouteData.Values["GUID"].ToString() == "New") sql_command = new MySqlCommand("sp_add_new_channel", sql_connection);
else sql_command = new MySqlCommand("sp_update_channel", sql_connection);
sql_command.CommandType = CommandType.StoredProcedure;
if (RouteData.Values["GUID"].ToString() == "New") sql_command.Parameters.AddWithValue("param_member_id", Convert.ToInt32(Session["member_id"])).MySqlDbType = MySqlDbType.Int32;
else sql_command.Parameters.AddWithValue("param_channel_guid", RouteData.Values["GUID"].ToString()).MySqlDbType = MySqlDbType.VarChar;
sql_command.Parameters.AddWithValue("param_channel_name", txtChannelName.Text.Trim()).MySqlDbType = MySqlDbType.VarChar;
sql_command.Parameters.AddWithValue("param_channel_address", txtChannelAddress.Text.Trim()).MySqlDbType = MySqlDbType.VarChar;
sql_command.Parameters.AddWithValue("param_channel_language", Convert.ToInt32(cboLanguage.Value)).MySqlDbType = MySqlDbType.Int32;
sql_command.Parameters.AddWithValue("param_channel_description", txtChannelDescription.Text.Trim()).MySqlDbType = MySqlDbType.VarChar;
sql_command.Parameters.AddWithValue("param_channel_allow_comment", chkAllowComment.Checked).MySqlDbType = MySqlDbType.Bit;
sql_command.Parameters.AddWithValue("param_channel_allow_like", chkAllowLikeIt.Checked).MySqlDbType = MySqlDbType.Bit;
sql_command.Parameters.AddWithValue("param_channel_allow_share", chkAllowShare.Checked).MySqlDbType = MySqlDbType.Bit;
sql_command.Parameters.AddWithValue("param_show_profile_photo", chkShowProfilePhoto.Checked).MySqlDbType = MySqlDbType.Bit;
if (RouteData.Values["GUID"].ToString() == "New") sql_command.Parameters.Add("param_channel_guid", MySqlDbType.VarChar).Direction = ParameterDirection.Output;
sql_command.Parameters.Add("param_is_exist", MySqlDbType.Bit).Direction = ParameterDirection.Output;
int result_rows = sql_command.ExecuteNonQuery();
if (Convert.ToBoolean(sql_command.Parameters["param_is_exist"].Value) != true)
{
website_event_log.add_event_log("Membership", txtChannelName.Text.Trim(), "You have successfully signed up");
Response.Redirect("~/Channels", true);
}
else
{
Session["message_title"] = "Error";
Session["message_title_Color"] = Color.Red.ToArgb();
Session["message_text"] = "The same channel address already exists. Please try another address.";
Session["message_button_title"] = "Back";
Session["message_button_url"] = Request.UrlReferrer.ToString();
Response.Redirect("~/Message", false);
}
Technology News @ www.JassimRahma.com
|
|
|
|
|
You have to close the connection first before issuing a response.redirect, well you should at least, or else it can cause an error, or leave too many copies of the connector open. I would have to do research on that to confirm it, but I don't redirect when reading or writing data to a database.
Response.Redirect is the last thing you want to do in a sub, after closing and disposing of objects.
It's actually better to write a function without response.redirect, and have the function return a result or exit code, and then redirect.
if (0 = createStoredProcedure()) then
response.redirect("~/option")
else
response.redirect("~/error")
End if
|
|
|
|
|
Is it possible to get a Tooltip or some pop up when i mouse over on an image button in asp?
|
|
|
|
|
Putting a TITLE attribute in your your IMG tag should get most browsers to show a tooltip.
<img src="myimage.jpg" title="show this text on hover" />
|
|
|
|
|
I need to display a count from my database on the tool tip when i move my mouse over a butoon.... Is it possible this way?
|
|
|
|
|
Yes. It is posible. JS + parametrized request to DB should do it.
No more Mister Nice Guy... >: |
|
|
|
|
|
Hi,
you can set the pop up text in alt and title.
Comm100 - Leading Live Chat Software Provider
modified 28-May-14 1:47am.
|
|
|
|
|
sir,
difference between a normal class and abstract class?
|
|
|
|
|
You could type that question into Google and get all the information you need.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Why bother doing that when you can get someone else to type it in, look through the links, find a suitable one and post it here? Particularly when that person is then required to answer any questions you might have about the link they've posted.
We're nothing more than a free Mechanical Turk[^] for Google.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Too true.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Then just use links to that page: http://lmgtfy.com/[^]
You provide the link they use it and in the end google what they want. Everyone is happy
No more Mister Nice Guy... >: |
|
|
|
|
|
What an imaginative title, in an asp.net forum. Its just a shame your question has nothing whatsoever to do with asp.net
In answer to your question, an abstract class cannot be instantiated.
|
|
|
|
|
|
Hi,
An abstract class is a class that contains a pure virtual method or function(inc c++). In C#, you do not need a pure virtual method to make a class abstract, just the keyword. Essentially when you make a class abstract, you are saying that you do not want any specific instances of it made, but the class can be used for inheritance. C# only supports single class inheritance. Also, with an abstract class it can contain other non pure virtual methods that provide functionality. For example, I can make an abstract class named Shape with a property to get and set the name and implement an abstract method to return the number of vertexes for that shape. I can't make a shape object, but I can inherit from it to make a square. I do not need to implement the name method because it is already defined, but I do need to implement the vertexes one because it is a pure virtual method.
Interfaces can be thought of as an abstract class that only contains pure virtual methods; however, in C# you can implement multiple interfaces to produce certain behaviors. You still need to implement all of the pure virtual methods, but you can use an interface and another class to represent a different "is-a" relationship.
Comm100 - Leading Live Chat Software Provider
modified 28-May-14 1:47am.
|
|
|
|
|
Hi,
I have used this code to change the cell value :
<script type="text/javascript">
function Open(IdNeed)
{
var grid = document.getElementById('<%=gvEstelam.ClientID%>');
grid.rows[1].cells[4].innerHTML = 152;
alert(grid.rows[1].cells[4].innerHTML);
}
the alert show that the "grid.rows[1].cells[4]" value has changed to 152 and also in gridview it changed
BUT
when i click on OK button of alert then the value is change same as before(ex.500).
How to set the new value to remain ?
And this is my cell code :
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="ImageEstelamBuyingKala" ImageUrl="~/ServerFile/ApplicationFiles/Icons/Button/add.png"
Width="25" runat="server" OnClientClick='<%# " Open("+ DataBinder.Eval(Container.DataItem,"Id") + ");" %>' />
</ItemTemplate>
</asp:TemplateField>
modified 22-Dec-12 11:03am.
|
|
|
|
|
Hi,
You can check the OK button event:
if the Gridview has been reload?
Or you paste your code here
Comm100 - Leading Live Chat Software Provider
modified 28-May-14 1:47am.
|
|
|
|
|
Hello,
I have created one file upload control in my asp.net page,now when ever i upload html page using this file upload ,i want to add one anchor tag to this html page.
Any Suggestions ??
Regards,
Ravi Vyas
|
|
|
|
|
i am not clear with your question,
do you want to add one more anchor tag in your html file?
in that case you need to write into your html file and append the data in the body section.
Let us know if this is your query.
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|