When a user clicks a button I need to create a .bmp file on the server. After the .bmp file is created I will load it into the html page. Would Ajax be the best way to accomplish this?
How should I go about this? I mean how does the control know whether someone is logged in or not? Session ID? Cookies?
Recommendation of which one I should implement? A guide or tutorial would be appreciated.
Hi
I have an app that has hundreds of words with 3/4 images for each word.
I have 2 versions of each word one for iOS 3 and one for retina display.
I wish to save the images as data and connect them to the appropriate word so it will be easy to pull them later.
my question is -
how do i get the suitable size ?
its works great with the @2x wjen you get it from the app file system, but hoe does it supposed to work when i get it from data ?
thanks
shani
Hi I have a usercontrol which includes some JavaScript, if I add the control to a standard web page I can start the JavaScript in the body tag, like this
<body onLoad="Start()">
The problem is that I need to add the control to a webpage which is inside a masterpage, how do I then start the script when a page inside a masterpage doesn't have a body tag.
I am trying to use checkboxes to select the items in a Listview. I have added a checkbox control in the , and they are displayed properly.
The problem is that Checked property never changes when I click on them. Why does this happen? And is there a workaround?
I have a class User and a class History. History has 'User' property, and User has 'Histories' property. So there's a database relationship.
But when I create a new User history class and set UserID property, I can't access the 'User' property.
var history = new History { UserID = 1 };
// history.User = null ???
How can I get the user?
I would like to use the IEnumerable function Intersect() to combine a few list and get the similar integers from each list. The problem I'm faced with is that I don't know how many list I will need to compare.
Here is an example:
A{1,2,3,4}
B{1,2,3}
C{1,2}
results = A.Intersect(B).Intersect(C)
This works great, but the next time around I may have a D{1,2} next time I come across the function.
I'd like to use the Intersect method, but I'm open to new ideas as well.
I have a few ActionLinks that when rendered are getting a length key/value added that appears to indicate the number of characters of the controller name. How can this be removed?
My view uses ModelX to render my HTML form and my controller action takes ModelY as input when saving the form. It seems the typesafe textbox API assumes I am using the same model in both places.
Is it possible to use different models and beeing type safe without creating my own helpers ?
<% = Html.TextBoxFor(x => x.Text) %>
I would like something like this. Does it exist ?
<% = Html.TextBoxFor<InputModel,OutputModel>(input=>input.Text, output=>output.SomeOtherText)
I'm creating a custom ActionResult class and I need it to be able to operate on a UserControl. All of the examples I've found so far pass in the full path like so:
return MyResult("~/ControllerName/UserControlName.ascx", myModel);
But I'd like it to operate the same way as calling View(), i.e. I just pass in the name and MVC determines the correct route:
return MyResult("UserControlName", myModel);
Is there a way I can find out the correct route to the control without specifying it manually?
Hello,
I'm wondering the opinion of what is the best way to pass a lot of values between pages. I was thinking of either saving the values to a database, using context.Items[], or Session[]. I'm not sure about what is the best method. I'm passing probably around 40 variables.
I have a page, lets call it SourceTypes.aspx, that has a a GridView that is displaying a list of Source Types. Part of the GridView is a DataKey, SourceTypeID. If source TypeID is passed to the page via a query sting, how to I put the Gridview into Edit mode for the appropriate row based on the SourceTypeID?
The GridView is bound to a SQlDataSource object.
I have a feeling I am going to kick myself when the answer appears!!
I have looked at Putting a gridview row in edit mode programmatically but it is some what lacking in specifics
In my web.config I have the following:
<customErrors mode="RemoteOnly" defaultRedirect="/error.aspx"/>
When an error occurs, the user is redirected to /error.aspx?aspxerrorpath=/somepage where I can get user's name, name of the page, date, but... I can't get the error message!
I can get it via the OnException method, but then I won't be able to get the name of the page which is very important for me.
How can I get both the page and the error message?
I have two page one is login and second is attendance..
In attendance page there is two button In and Out visible any one of them at a time..
while i am pressing back button it navigates to previous button instead of previous page. plz give me solution for this..
Hello, I have C# application that retrieve data from AQ with some oracle stored procedure, that stored in package. The scheme is:
C# code - Stored Procedure in Package - AQ
Inside of this stored procedure I use DBMS_AQ for dequeue the data to some object of some type.
Now I have this object. My question is how I return it?
Previously I:
Created some virtual table,
Make EXTEND() to table
Inserted the data from object to table,
Perform select on the table,
And return sys_refcursor.
In side of C# I filled DataSet with help of OracleDataAdapter.Fill()
After that I upgraded it to return data fields during OUT parameters.
But now I have much fields, and I may not to create so much OUT parameters...
What the best way to do this?
Thank you for ahead.
I change an image in the header based on which menu item is selected. The problem is that the image stretches in the image control. I want it to automatically zoom without distorting the image. Is this possible.
Note: The images reside in an images folder and are not all the same size.
Javascript
<script type="text/javascript">
function ChangeProjectImage(imgpath) {
var img1 = document.getElementById("Image2")
img1.src = imgpath;
}
</script>
I'm thinking whether it makes sense in order to increase the speed of the website to do some strategy of caching the js files that are being included ?
one idea that I have is to do something like this:
[OutputCache(Location = OutputCacheLocation.Any, Duration = 3600)]
public JsController : Controller
public ActionResult JQuery()
{
//I would have a ascx with the entire jquery script inside
return View();
}
and on the site.master:
<%=Html.RenderAction("JQuery","JsController");
I have two user controls on the page and one of the user control has this text aread.
which is used to add a note and but when they click add note button the page reloads.
I do not want the page to reload ,i was looking for an example which this is done without
postback.
Thanks
I have three tables in my database: An A table, a B table, and a many-to-many ABMapping table. For simplicity, A and B are keyed with identity columns; ABMapping has just two columns: AId and BId.
I built an Entity Framework 4 model from this, and it did correctly identify the N:M mapping between A and B. I then built a WCF Data Service based on this EF model.
I'm trying to consume this WCF Data Service. Unfortunately, I can't figure out how to get a mapping between As and Bs to map back to the database. I've tried something like this:
A a = new A();
B b = new B();
a.Bs.Add(b);
connection.SaveChanges();
But this doesn't seem to have worked. Any clues? What am I missing?