Things seem to be back to normal now, thank you! And apologies for posting without checking the FAQ.
Dinesh Mani
Posts
-
Not receiving newsletters after email update. -
Not receiving newsletters after email update.Recently I updated my email id in the profile and ever since I've not received any of the newsletters from CP. I changed the both login email as well as article email details. I'm able to login using the new email and the problem is only with the email delivery. BTW, I've even checked the junk email folders and nothing's there.
-
summary classes for gridviewCreating a class and accessing the base class to get the data out is anyway going to waste your memory. Actually you will be wasting double the memory by doing it this [Memory for your original class and memory for the new class with the filtered data]. Its is better to either put a different class that pulls out only the data required for the grid or to leave your system as-is. Just my 2 cents. HTH!
-
web installer interruption [modified]Check if the target .NET framework version is installed on the server/machine where you are tying to deploy the web application. It might be possible that the target .NET framework version is not installed on that machine. If that is the case then install the required framework using the redistributable and proceed with the website installation. If the target .NET framework is installed then, check if the target framework's ASP.NET libraries are registered on the machine/server's IIS. If not then register the ASP.NET libraries using aspnet_regiis of the respective framework. Check the tool's documentation @ ASP.NET IIS Registration Tool (Aspnet_regiis.exe)[^] If the required .NET framework is installed and ASP.NET libraries are registered in IIS and still this error is thrown then check the default version of .NET framework that is configured in IIS. If it is not the desired version then create the necessary virtual directories / websites and set the target .NET framework manually and then proceed with the website install. Ensure that you use the new virtual directories / website for the installation. HTH!
-
ASP.net master page redirectI would rather put the Authorization code in a base class and inherit in all the other classes. Doing Authorization from Master pages is not a good practice.
-
How to Display Confirmation Dialog BoxCheck these pages - JavaScript Confirm[^] JavaScript - Confirm pop up[^]
-
Update a Database Using Dropdownlist in ASP VB.Net* Now that you have the drop down list object, you can get the selected value/text. * You need to determine the row from which the event was fired and get the id. - Simple means would be to associate the primary key data to the dropdown using attributes. You can use these data to save the info to the database. HTH!
-
Update a Database Using Dropdownlist in ASP VB.NetWhere is the rest of the code behind?? or do you want us to help you in writing that???
-
Exception in C#Can you share the details on what you are doing and the section which is raising this error?
-
javascript expected ')'Couple of things that I see is missing/wrong... 1.
document.getElementById("<= Label_Liability.ClientID %>).style.visibility = "hidden";
should be
document.getElementById("<%= Label_Liability.ClientID %>").style.visibility = "hidden";
2. I see one extra ")" at the end of the javascript block... Line 12. Suggestion - Always use single quote ['] with javascript.
-
How to Hide A GridView Column in a Visual Web Developer projectI've tried to translate the coding from C# to VB.NET. I think this is the equivalent -
Protected Sub GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
If (GridView1.EditIndex < 0) Then
Exit sub
End IfIf ((e.Row.RowState == DataControlRowState.Normal || e.Row.RowState == DataControlRowState.Alternate) && (e.Row.RowType == DataControlRowType.DataRow || e.Row.RowType == DataControlRowType.Header)) Then e.Row.Cells(2).Visible = False e.Row.Cells(3).Visible = False End If
End Sub
NOTE: I've not worked in VB.NET for sometime so go easy on me if it doesn't work :-\ HTH!!
-
How to Hide A GridView Column in a Visual Web Developer projectCheck this blog post - Hide GridView columns in normal mode, and show more columns in edit mode[^] HTH!
-
how to display an image from folder when there is no image in databaseMy assumptions - * Default image is also in the database * BranchId is numeric * Default image has the least possible BranchId say 0 Alter the query like so -
SELECT top 1 imgleft1 FROM tblImages WHERE BranchId in (@BranchId, @Default) order by BranchId desc
Add this line to the code
cmd.Parameters.AddWithValue("@Default", 0);
Now if the BranchId is available then that image would be displayed, else the default image would be displayed. HTH!
-
dynamically creating .aspx pages with controls using asp.net with c#I'm not sure if you can create a page, as in a physical .aspx file dynamically. But, it is possible to create and place controls during run-time. You have to have a base page i.e. a blank page with the required panels [Left/right/...]. When the user clicks on the button on the user input form, get the values from the textboxes and use it to loop and create controls. You can create controls like this
_[ControlType]_ control__LoopCounter_ = new _[ControlType]()_
Set the appropriate properties and add the control to the required panel. HTH! -
How to hide Querystring ParametersFirst of all passing password on your URL is bad, what ever way you do it. If you wish to not use session/cookies/server.transfer then you are left with only querystring or the request.form objects. As far as I know you cannot hide data from querystring, you can encrypt/decrypt it though, but you don't want to do it. So, you have to go the classic ASP way and POST the data to the new page and get the data using request.form. HTH!
-
DateTime ProblemI assume you want to display 5/13/2010 as 13-May-2010 and not 08-May-2010. Its very easy to do it. If you are displaying the date in a label then you are probably assigning the date value to the text property like this
Label1.Text = DateTimeValue.ToString();
. Now to apply formatting in this case just pass the format string as parameter to the ToString() function like thisLabel1.Text = DateTimeValue.ToString("dd-MMM-yyyy");
You could also use thisString.Format("{0:dd-MMM-yyyy}", DateTimeValue.ToString());
NOTE - Month should be specified as "MMM" and not "mmm". For more format strings refer this page - String Format for DateTime [C#][^] -
Problems with Button Click EventSee if there are any event delegates that you have missed. May be the code expects you to catch the callback on the container page.
-
webconfig size problemThe web config file is loaded when the application goes online. It is loaded only once and is shared between all users. So as long as you have a decent hardware configuration for your server, you shouldn't have any problems, it should work. On the flip side having a large number of config entries can increase the seek time when accessing config items. HTH!
-
Data not transfering to another pageFirst and foremost, edit your post and remove the connection details. Its not so good to post your SQL server's sa password on forums even if it is CodeProject. First step to solving this would be to step through your code and identify if the dt that your are persisting in the session has any values. Debug the application, put a break point on the statement
Session["CheckedRecords"] = dt;
. Check if it has any values before going into the session. If it has values then on the 2nd page check what you are getting out of the session. Again put a break point on the lineDataTable dt = (DataTable)Session["CheckedRecords"];
and check the values in dt. Some suggestions [read free advice :-D] 1. Data table is an reference type. You need not return it fromAddNewRow
andRemoveRow
methods. The dt in the calling function and the dt local toAddNewRow
andRemoveRow
methods point to the same datatable in the heap. Doing this way would just increase the over head on the GC and reduce maintainability of your code. 2. In theAddNewRow
method, rather than doing "dt.Rows.Count - 1
" every time, do it once and store it as rowNum and use it subsequently. This reduces the number of execution cycles. 3. Format your code. Proper indentation improves readability. HTH! -
Help for right syntax in .net for defining variables in web pagesYou can do it in many ways, the simplest would be to do it with javascript. Just add the contents in div tags, set the display property on the click of the links using javascript.