|
Hi juno101,
As you know in a .net If you want to run a aspx files you need to create a project and in project template has a solution,project and config files.If you build projects or run the whole projects run included its supporting files and finally its create a assemblies and dlls of projects. so you need to upload aspx,web.config and bin folder.
|
|
|
|
|
Thank you very much Sanjay for your help.
Per you advice, I have located the *.dll file under the bin folder. But i am having a hard time locating the 'aspx,web.config'
Please advise,
|
|
|
|
|
Hii..
I Am working on Client Tracking Application(asp.net 4.0 and c sharp),In Which we kept Function FnFillDropDown()
In Global.asax file and called this function on Application_start event inside Global.asax.
FnFillDropdown: this fn basically use to fill dropdown of country, city, common paramter , states names etc.
As this function is kept in global.asax file,when we add new country or state we have to manually reset the iis using iisreset command. Our site is hosted on local network
But we are going to host our site on web very soon .
for that reason we need a quick solution to reset applicatoin state
or tell us how do we call FnFillDrowpDown() Method from Code Behind
My Code is
public class Global : System.Web.HttpApplication
{
private void FnFillDrowpDown()
{
Application.Clear();
BODropDown objBODropDown = new BODropDown();
DADropDown objDADropDown = new DADropDown();
DataTable dtList = new DataTable();
objBODropDown.EntityKey = DDLEntityKey.REG_COUNTRY;
dtList = objDADropDown.GetValueList(objBODropDown);
this.Application.Add(DDLEntityKey.REG_COUNTRY,dtList);
}
public void Application_Start(object sender, EventArgs e)
{
FnFillDrowpDown();
}
}
I have also Tried to call this method using object of class Global but its throws Object Reference not Set..
Error as Application State coming out null..
Please suggest me any solution for this problem as i am new for asp.net
Thanks...
|
|
|
|
|
I want to Convert a text string into hyperlinkable email dynamically (coded either in VB or C#). I have tried some several methods as posted but not successful. If you know some sources, could you share? Thanks.
|
|
|
|
|
I think I originally saw this on CodeProject some years ago, but I can't remember where:
public static string AutoLink(string text)
{
return AutoLinkRegex.Replace(text, match =>
{
string link = match.Value;
int length = link.Length;
int index = length;
while (index > 0 && link[index - 1] == '.')
{
index--;
}
if (index != length)
{
link = link.Substring(0, index);
}
if (link.StartsWith("www.", StringComparison.OrdinalIgnoreCase))
{
return "<a href=\"http://" + link + "\">" + link + "</a>";
}
if (link.StartsWith("ftp.", StringComparison.OrdinalIgnoreCase))
{
return "<a href=\"ftp://" + link + "\">" + link + "</a>";
}
string protocol = match.Groups[1].Value;
if (!string.IsNullOrEmpty(protocol) && protocol[protocol.Length - 1] == '@')
{
return "<a href=\"mailto:" + link + "\">" + link + "</a>";
}
return "<a href=\"" + link + "\">" + link + "</a>";
});
}
private static readonly Regex AutoLinkRegex = new Regex(
@"\b((http://|https://|ftp://|mailto:|news:)|www\.|ftp\.|[^ \,\;\:\!\)\(\""\'\<\>\f\n\r\t\v]+@)([^ \,\;\:\!\)\(\""\'\<\>\f\n\r\t\v]+)",
RegexOptions.IgnoreCase | RegexOptions.Singleline);
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Homer: Thanks SO MUCH for your code!! It works PERFECTLY.
|
|
|
|
|
Good to hear, but my name isn't Homer. That's just a Simpsons quote in my signature.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
i am using two session in my web project,both session pick different different value and i have one page to show with the help of that session. Now how i can use one page for different different session value.
plss help me
|
|
|
|
|
In my project, I planed to databinding images stored in a MS Access file. Per the procedure in Displaying Images from a Database in a GridView[^], the DataImageUrl should be in the GridView Properties Panel. However, when I opened the GridView Properties Panel, there is no DataImageUrl item (only has ClientIDRowSuffix, DataKeyNames, DataMember, DataSourceID in Data Category). Why the DataImageUrl item is not there? Do you know why? Thanks.
|
|
|
|
|
You're looking at the properties of the GridView ; you need to be looking at the properties of the ImageField .
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Homer: Thanks for your post. Per your advice, I went through again step-by-step, and got the problem solved.
|
|
|
|
|
Hey Friends,
Thnx For the help last time, It was great on your part and the error gor solved. But again have stuck up at a point, where i have to upload the images and store it in the questions database.!the question must be in image format and the answers could also be in image format, and i have to save all this in the question database.!
Please Help me out friends.!
|
|
|
|
|
|
Code To upload Your Image to folder
YourFunctionToUploadImage()
{
if (ImageFileUploadControll.HasFile)
{
string fileExtention = System.IO.Path.GetExtension(ImageFileUploadControll.FileName);
if (fileExtention.ToLower() != ".jpg" && fileExtention.ToLower() != ".jpeg" && fileExtention.ToLower() != ".png")
{
lblUploadstatus.Text = "Invalid File Choose .jpg/.jpeg/.png/.gif";
}
else
{
if (File.Exists(Server.MapPath("~/Folder_Name/" + ImageFileUploadControll.FileName)))
{
lblUploadstatus.Text = "File Already Exists. Rename filename";
}
else
{
ImageFileUploadControll.SaveAs(Server.MapPath("~/Folder_Name/" + ImageFileUploadControll.FileName));
lblUploadstatus.Text = "Upload Status : File Uploaded Successfully";
}
}
}
else
{
lblUploadstatus.Text = "Please Select File";
}
}
Code To Retrive All Images form Folder and display in image_control you can use
PageLoadEvent()
{
DirectoryInfo dir = new DirectoryInfo(Server.MapPath("~/Folder_Name/"));
FileInfo[] fi = dir.GetFiles();
foreach(FileInfo f in fi)
{
string imageUrl = f.ToString();
Image img = new Image();
img.ImageUrl = "~/Folder_Name/"+"imageUrl";
}
}
Hope This Help
Pratik Bhuva
---------------
The night is darkest just before the dawn. And I promise you, the dawn is coming
|
|
|
|
|
Can anyone share asp.net 4.0 interview questions.
Regards.
|
|
|
|
|
Your first question: Can you use Google[^]?
Veni, vidi, abiit domum
|
|
|
|
|
I have to say there is no real way to prepare for this: no matter what you study, they'll still manage to ask you something you don't know or have never heard of. You commit that new one to memory and then never get asked it again.
Or they ask you a question; you give the right answer and they tell you you're wrong. Doh!
Cynical? Jaded? Moi?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Those who seek perfection will only find imperfection
nils illegitimus carborundum
me, me, me
me, in pictures
|
|
|
|
|
Agree with Mark. This is not a right way to learn.
Here more than couple of ways to learn anything in Internet. Education Needed[^]
Interview questions, Dumps, copy-paste codings are bad for learning.
thatrajaNobody remains a virgin, Life screws everyone
|
|
|
|
|
I don't think those questions will help you if you have no hands on experience in ASP.Net.
|
|
|
|
|
Hey all,
I've got a gridview that is binding images with a 100% width.
The image stretch fine in IE10, Chrome and FF, bit in IE7 the image is its original size.
Is there any workaround for this issue?
|
|
|
|
|
Dear all,
I am currently an novice user in the asp.net environment and would like to request assistance on the following topic below:
I am using 'c.Cover' as field name from database table, which has three types (i.e. talk, cvr, trd). I would like to filter my query, so it prints out yesterday's data with only cvr and trd types only.
from the code below, I am unable to filter my data using the following link below. I still not getting the correct response output from the client side.
http://localhost:38853/api/test?type=CVR&TRD</a>[^]
public IEnumerable<database_WICs> GetPriceType(string type)
{
DateTime yesterday = DateTime.Today.AddDays(-2);
var data = from c in db.database_WICs
where c.UploadDate <= yesterday &&
c.Cover == type &&
c.Cover == type
select c;
return data.ToList();
}
Any help would be much appreciated.
Many thanks for your time and help.
|
|
|
|
|
There are a few issues. The ampersand "&" actually separates parameters from each other. Consequently, type has the value of CVR only, and there is a second parameter named TRD without extra information. You need a different separator, what about a pipe | or + or....
Next, you do not want to get elements where the Cover column has both values at the same time - that does not make sense. It is sufficient when one of them matches. In boolean operators, that is an OR .
Instead of
c.Cover == type &&
c.Cover == type
you'll need a
(c.Cover == type1 ||
c.Cover == type2)
Note that you have to split the type parameter into type1 and type2 .
|
|
|
|
|
First - your localhost can't help us!!!
Second - yesterday is today -1 not -2!!!
Third - you pass in type and do
c.Cover == type && c.Cover == type
what you mean is
c.Cover == "cvr" || c.Cover == "trd"
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
Hello,
thank you so much for your response.
I updated my code but now I am expericing the an application error:
A potentially dangerous Request.Path value was detected from the client
public IEnumerable<database_BWICs> GetDatePrice(string type, string trd)
{
DateTime yesterday = DateTime.Today.AddDays(-1);
var data = from c in db.database_BWICs
where c.UploadDate <= yesterday &&
c.Cover == type ||
c.Cover == trd
select c;
return data.ToList();
}
http://localhost:38853/api/daily/type=cvr&trd=talk[^]
I am working on putting the application onto the server. Please bear with me, I shall forward you an appropriate link in couple of minutes time.
Thank you for your time and help.
|
|
|
|
|