|
If you know how many cells to be merged then you could use this. But if you dont know how many cells to be merged, for example for an employee, no. of dependents will be differing.
So Declare a class global variable and in
GridView1_RowDataBound event, try this
if (str != e.Row.Cells[2].Text)
{
str = e.Row.Cells[2].Text;
}
else
{
e.Row.Cells[2].Text = "";
}
![Smile | :)](https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
I need to put scroll bar in some region of my aspx page not on whole page.
I know it in HTML page, but I need to put in aspx page in asp.net.
Please reply me.
Thanks & regards,
Jay
|
|
|
|
|
Use ASP.NET Panel control to cover the region and set the ScrollBars property appropriately.
|
|
|
|
|
//you can use panel or div
//div
//panel
<asp:panel id="Panel1" scrollbars="Vertical" runat="server" style="OVERFLOW-Y: auto; overflow-x:hidden; HEIGHT:200PX; width:80%">
Padmanabhan
|
|
|
|
|
Hi,
you can do this by 3 ways:
1.Using Panel (Server Control)
2.using DIV Tag (HTML Tag)
3.using Iframe (HTMl Tag)
if you want to scroll in verticle/horizontol then you set height/width of above control
Farogh Haider
Web developer
|
|
|
|
|
Respected Sir
I Define One Usercontrol that Contains One AjaxCalendercontrol
And One TextBox in my Project I need Replacing The TextBox With Label then controltovalidate property is not working for label my task is replacing textbox with label please help me i wrote the following code
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DateAjax.ascx.cs" Inherits="dotnetcode_UserControls_DateAjaxl" %>
<%@ Register Assembly="Validators" Namespace="Sample.Web.UI.Compatibility" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<DIV class="divColLast">
<asp:TextBox ID="txt_Date" runat="server"></asp:TextBox><asp:ImageButton ID="ImgCalendar" runat="server" ImageUrl="~/dotnetcode/Images/Calendar_scheduleHS.png" CausesValidation="False" /><cc1:RequiredFieldValidator ID="Rfv" runat="server" ErrorMessage="<b>This Is Mandatory</b><br/>Please Select the Date" ControlToValidate="txt_Date" Display="None" SetFocusOnError="True"></cc1:RequiredFieldValidator>
<ajaxToolkit:calendarextender id="CE" runat="server" popupbuttonid="ImgCalendar" popupposition="Right"
targetcontrolid="txt_Date"></ajaxToolkit:calendarextender>
<ajaxToolkit:ValidatorCalloutExtender ID="VceRe" runat="server" TargetControlID="Rfv" HighlightCssClass="validatorCalloutHighlight">
</ajaxToolkit:ValidatorCalloutExtender></DIV>
|
|
|
|
|
Validation controls are used to validate input from users in a web page. Therefore it can be applied to user enterable/changeable fields like textbox, dropdownlist, listbox etc. But Label is a display field and the user cannot change the content of a lable directly. So you cannot use the validation control with Label.
|
|
|
|
|
A lot of places like to use automagic code to replace TextBoxes with labels in "read-only" view. The real magic is you can still submit changes to the labels if permissions have not been properly addressed. (And they usually aren't)
|
|
|
|
|
Hi,
I am new to asp.net,I would like to know whether my website hosted in the webserver affect other sites hosted in the same server?, I mean the resources used by the website is very high, Should i bother about the resource utilization by my site or it is the head ache of the Service Provider?
Plz help.
|
|
|
|
|
Subin Alex wrote: Should i bother about the resource utilization by my site or it is the head ache of the Service Provider?
As a best practice, you should try to minimize it.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
If your website uses more that allocated to you, say bandwidth. your users will get a message saying that the website has reached the limit and the site will be shutdown for 1-5 mins and going forward you will get a notice from your service provider.
|
|
|
|
|
Hi,
Just try to figure out first why is your website running high on resource? Just check whether is is because of any coding issue or not. If it is acoding issue then you have to optimize the code. Take help of latest web debugger tools which will tell you which particular web request is creating the resource crisis. If I would be in your place, then I would like to check it in the staging server or in the development server for performance before final release. If you are sure that it is running perfectly fine in your environment then probably you need to check the production server's system and hardware configuration. Then you can definitely ask the question to your service provider.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
Hi,
yes, you can upload more than one application in same domain. But there should be exactly one webconfig file.
Farogh Haider
Web developer
|
|
|
|
|
Hi,
I am new to asp.net,I would like to know if a user enters his e-mailid in my form,
How to check whether it is fake or not?
Plz help.
|
|
|
|
|
Hi, I think you should definitely use a regular expression. A quick google search for "valid email regular expression" leads to a good example here: http://www.codetoad.com/asp_email_reg_exp.asp[^]
That source is in the older ASP (not .NET), but the function should still work.
--EDIT -- actually you'll need to change around the function a bit but you get the idea.
|
|
|
|
|
|
//java script
function isValidEmailID(emailid)
{
var regex = new RegExp("\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*");
var matches = regex.exec(emailid);
return (matches != null && emailid == matches[0]);
}
//aspx.cs
email = txtEmail.Text.Trim();
if (!IsValidEmail(email))
{
custVal.ErrorMessage = "Valid EmailID : Must be Entered";
custVal.IsValid = false;
return;
}
Padmanabhan
|
|
|
|
|
You can't, actually. There is no way of doing this. You can tell if an email address is possible, but not if it's real.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
There is no way to know for sure, but you're close if you connect to the users smtpserver to find out if it accepts mail to the recipient.
Here's[^] how to do it.
|
|
|
|
|
Hi,
You can check email format by using validation & if you want to check it is exist or not
then you should use any webservice or free dll.
Farogh Haider
Web developer
|
|
|
|
|
My problem is when i populate data in the Gridview using collapsible control extender its populating data on collapse and expand both.
But i dont want it populate data on Collapse.
Please suggest solution
Thanks
Danish
|
|
|
|
|
You have to remove the postback.
Either you love IT or leave IT...
|
|
|
|
|
Hi All,
How to disable repair option in .net wensetup. please help me regarding this.
Pradeep Reddy
|
|
|
|
|
How is this an ASP.NET question ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi All,
I don't have too much confidence in asp & I encounter difficulty to attach a csv file in my code, could you help me please?
Thanks
<pre>namespace SendProductData
{
classSendProductData
{
staticvoidMain(string[] args)
{
string upload_file = @"d:\BLABLA\prod.csv";
string url_link = "https://BLABLA.com/index.php?d=webServices_Server&c=ServerRest&rm=importFileContr&rf=importProduct&sl=e3068BLABLABLABLAbf8d04&FILENAME=";
HttpWebRequest WebReq = WebRequest.Create(url_link + upload_file) asHttpWebRequest;
WebReq.ContentType = "UTF-8";
WebReq.Method = "POST";
WebReq.ContentLength = 0;
WebReq.Credentials = newNetworkCredential("LOGIN-BLABLA", "MDP-BLABLA");
using (HttpWebResponse response = WebReq.GetResponse() asHttpWebResponse)
{
// Get the response stream
StreamReader reader = newStreamReader(response.GetResponseStream());
// Console application output
Console.WriteLine(reader.ReadToEnd());
response.Close();
}
}
}
}
|
|
|
|